Answer the question
In order to leave comments, you need to log in
How to transfer data from csv/pdf table to html table?
I have tables with a large amount of data.
I would like to insert some columns from this table into the html code as in the figure below:
What is the best way to perform such a transfer, or at least simplify the task?
Previously, I wrote Java code to automate this, but due to the fact that from time to time the table headers and contents change, it needs to be constantly changed and this takes a lot of time.
Answer the question
In order to leave comments, you need to log in
Forget PDF right away
Since you didn’t really indicate the language of the backend, except that it was once Java (something tells me what JS meant, people who write in Java ask deeper questions), then let’s say you have php
https: //www.php.net/manual/ru/function.fgetcsv.php - for large csv, so as not to load the entire document at once
$file = fopen('myCSVFile.csv', 'r');
while (($line = fgetcsv($file)) !== FALSE) { // смотрите документацию, скорее всего
// разделитель поправить придется
print_r($line); // $line здесь - представление строки из csv файла как массива
}
fclose($file);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question