S
S
Stepan2015-11-01 11:24:24
JavaScript
Stepan, 2015-11-01 11:24:24

How to process a CSV file in JS and form an HTML table from the content?

Hello everyone
The bottom line is this: there is a csv file of a known structure (this is for simplicity, and there are two file options), its contents are used to form stickers (labels-stickers) for the product and their subsequent printing.
Initially, the whole thing was worked out by a macro in Excel (the speed was more than satisfactory, but there were problems with scaling / printing), then the macro had to be adapted to Word, where it also encountered limitations, the main of which is the very low speed of forming / filling the table with content .
I had an idea in my head for a long time to implement processing in HTML / JavaScript: ease of design, more freedom of action is obvious (I have seen separate components, such as fast CSV parsers).
Perhaps this question is more suitable for the task on freelansim (TOR is almost ready), but I wanted to see possible solutions.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2015-11-04
@Vovchikvoin

This is easy to do with regular expressions, parse the string into a js object, and then do whatever you want with it, start the loop and draw. Like this: https://jsfiddle.net/hgg201jt/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question