B
B
barma0012020-07-14 06:43:57
Vue.js
barma001, 2020-07-14 06:43:57

How to load data from a file?

Hello,

I have a csv file.
Is it possible using only vue js to load data from a file and display it in a table?
How to solve such a problem in general?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WinPooh32, 2020-07-14
@WinPooh32

Is it possible using only vue js to load data from a file and display it in a table?

Can.
How to solve such a problem in general?

In the simplest case, csv is a plain text file, where columns are separated by commas, and lines by a newline character "\n", in the case of Windows, a carriage return character "\r\n" may also be present.
There are heaps of libraries that will do all the parsing for you.

V
Vladimir Korotenko, 2020-07-14
@firedragon

A bit much for your task, but look at the principle, and in general an interesting library.
https://github.com/d3/d3-fetch/blob/v1.1.2/README....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question