Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7509009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:47:12+00:00 2026-05-29T22:47:12+00:00

I already have the code for exporting a html table to excel, but how

  • 0

I already have the code for exporting a html table to excel, but how can I hide the table and still access it with javascript?

<div id="dataExportDiv" style="display:none">
   <table>
      ...table data here...
   </table>
</div>

But the resulting excel document doesn’t have any data. I’ve tried exporting without hiding the table and it works, so I know the export javascript is valid.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:47:13+00:00Added an answer on May 29, 2026 at 10:47 pm

    You could display the table off screen (out of the viewport):

    #parent {
      position: relative;
    }
    table {
      position: absolute;
      left: -9999px;
    }
    

    Beware that it’ll still display if CSS are desactivated (obviously) and will be read by screen readers.
    If you’re displaying a chart, this table will be a good text alternative to them (with proper th and scope="col|row") otherwise they’ll find it a PITA if it’s 3km long.
    In the latter case, you can hide the table from most recent screen readers with the attribute aria-hidden="true" on table element and provide a skip link just before the table for older screen readers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to following code: http://www.nomorepasting.com/getpaste.php?pasteid=22987 If PHPSESSID is not already in the table
I have code that is exporting to excel and i have an array of
I already have code which lazy loads scripts on request. My issue now is
I'm working on a video codec for OMAP3430. I already have code written in
I already have Java code to display and process data from a database. I
I have already have this code to force these URLs to HTTPS: RewriteCond %{HTTPS}
This is my php code (I already have a connection to the db): $result
This is similar to this question, except the code is already written. I have
I already have a deploy.rb that can deploy my app on my production server.
I have already seen a post about the error but This is some what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.