I figured out how to generate Excel spreadsheets that open with newer versions of Excel, but it turns out many clients are using old versions of Excel. So I need to figure out how to generate old Excel files.
I used this to generate the files:
http://en.wikipedia.org/wiki/Microsoft_Excel#XML_Spreadsheet
I don't need anything too complex, I just need to insert simple rows and columns. I can't find anything that shows me the old format though (I'm hoping it's at least something human-readable). I'm not even entirely sure which versions of Excel they are using. Is there some way I can generate an Excel document that will work for older versions?
I'd prefer if there was something that let me generate the file myself, but a library would be fine too. I'm using JS and Node, and all I can find is node-excel, which claims to have the first version done in March, and I assume will have the same problem as the simple program I wrote (not working with versions of Excel prior to 2002).
Thanks for reading.
Related
I am now working on an Angular application that modifies an existing excel file (.xls) uploaded by the user then save the modified file in the local. The point is this excel file contains some fancy styling and a lot of macros, with several buttons which contains a lot of VBA code (I am not excel expert, sorry if I mistake their name).
I have tried several existing solutions till now:
xlsx
exceljs
For the first solution, I can only access the community version which basically ignores all these information: style, macro/VBA.
For the second solution, it can preserve almost every style but ignores the macro/VBA.
Except for these solutions, I haven't found any working solution. I turn to the community for help, any kind of solution, even a little hint would be appreciated!
I am creating a CSV file using JavaScript. I was unable to manage text format(like header text should be bold). Please help me if anyone has any idea around my requirement.
As far as I know, it is not possible to include text formats in a CSV file. If you want to include formatting information with the data for display in Excel (or am application compatible to some extent with Excel) an alternative may be to produce an XLSX file instead. There are libraries available to do this in Javascript. See, for example, https://github.com/SheetJS/js-xlsx
EDIT: I have just noticed that the freely available community edition of js-xlsx apparently does not support formatting. An alternative is the following library: https://www.npmjs.com/package/exceljs
I am trying to get my html table in a MS Excel document and I have tried many examples from here and internet but most of them didn't work. Mostly I can download a .xls file and when excel opens that file it comes nothing (not even standard Excel grid). And when I open the .xls files with Notepad, I can see that file actually holds values.
Most of the comments in previous questions were telling they work but these question dates are also little bit old and I can't tell if I am having version problems.
For example Javascript to export html table to Excel , I can download an Excel file but can't see values in it.
Also this DataTables example work well for me but I don't need all the stuff they provide like searching and listing.
Please let me know if any of you had such trouble and how did you solve them.
You have a solution (by your own admission): DataTables. Any features you don't need can be turned off or just not used.
I'm looking into potentially building code for NetSuite to read the contents of an Excel file (XLS or XLSX) within JavaScript in order to process the data. I can do this just fine with a CSV file, but I'd like to expand capabilities to read Excel worksheets.
I've seen a variety of scripts to read in Excel files, but they all seem to revolve around a dependency of Internet Explorer, and none of them seem to offer a solution on how to get the used columns and rows. They assume you already know this information ahead of time. NetSuite being what it is, these solutions don't really work, and you have to grab the base64 encoded contents of the file object stored in the system. This isn't an issue with CSV files, it's still just plain text.
I've done some testing and found that I get different results when trying to decode the string (I get something from XLS, but nothing from XLSX). I was wondering if anyone has tried and succeeded and reading data from these files formats in a NetSuite JavaScript implementation. If there's no good way, then I'll just have to force use of CSV, but I'd like to have some flexibility.
Essentially, you are asking for a javascript implementation of XLS and XLSX parsers. It is incredibly difficult, mostly due to the nature of the data format and the sheer amount of parsing required to get basic data).
I have built a basic version:
http://oss.sheetjs.com/js-xls/ (xls)
http://oss.sheetjs.com/js-xlsx/ (xlsx)
I have a project on exporting data to excel using JavaScript. But the constraints are : It should work for all browsers unlike ActiveXObject(that works only for Internet Explorer), window.open(that doesn't works for internet explorer).
It should not depend on other applications like Flash (I have seen a code using jQuery and Flash, but I can't use that in my project) e.t.c.
Please tell me whether it is possible and if it is, then suggest me a method to do this...
And one more thing, Manual work shouldn't be there or if it is, then it should be very less. In other words, it should be completely automated.
Suggestions:
use CSV file format and write a CSV writer in JavaScript yourself
use Microsoft's Office Open XML file format (xlsx) and write JavaScript code that generates such a file (should not be too difficult as it is XML based and there should be a lot of code around generating XML in JavaScript)