Modify existing excel file with macro using Javascript - javascript

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!

Related

How to add a text to scan (Existing) PDF with Javascript

I tried to add a text to scan PDF using JS.
I want to develop a program that gets a PDF file and edit it by adding Text to it, using a script.
I need a script in Javascript
I read about PDF-LIB and I couldn't found any of describing.
(I also tried to find a script in python,I couldn't found).
If there another way (api in adobe, languages, etc) to achieve my goal, I'll appreciate to learn about it.
Thanks
Eliran

Export HTML Table to MS Excel 2010

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.

javascript autocomplete with source being names of files from a directory

I have spent a considerable amount of time googling this and was hoping someone on here had a reference or starting point I could expound upon.
I am looking for a javascript/jquery AutoComplete script which has the source being the file Names inside of a directory. I welcome any suggestions... thanks!
If worse comes to worse, I can just use an AutoComplete script (jqueryui or typahead.js) which has a source file for the results, but then I would have to code a separate function to automatically write to that file each time a new file is put into the directory or is deleted from it, and I am just trying to avoid that should something already exists.
EDIT server side scripting is unfortunately not an option for me. This is being run through an HTML Applications (HTA) file, so fortunately I do have additional freedoms than a typical web application.
I found an article for autocomplete textbox using jsp, jquery has been used but the code is written in such a way the data is retrieved from database and it comes as a suggestion when user types a letter or part of word.
if you are looking for it, you can click it here

read text file and save the content in an array using JavaScript

I've searched a lot about this topic, but couldn't find solution. I have a *.txt file containing coordinates (each line has one coordinate) in one column. So, I want to read this file from my file system and use those coordinates to visualize the tracking route on Google Maps API v3. I've already visualized the track for three coordinates and it works fine.
Can anybody just share a sample code of reading a *.txt file and fill an array with the file content? Maybe this is quite easy thing, but I am really stuck on this and would appreciate your help!
Thanks in advance!
You can't read a file using javascript. It's a client-side programming language. But some developpers have developped a solution.
Check this link and tell me if it was helpful for you: http://www.htmlgoodies.com/beyond/javascript/read-text-files-using-the-javascript-filereader.html#fbid=iTAoMveIKhq
I'm not going to share a sample code but you could read the answers to that similar question :
Javascript - read local text file
Basically loading the txt file with Ajax, and read the responseTextattribute of the response.
Although it would be easier to read a xml file or a json file, which would be easier to parse than a simple txt file.

Generating Excel Spreadsheets - old format

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.

Categories