Questions tagged [csvtoarray]

CSV file conversion to an array.

CSV file conversion to an array.

21 questions
5
votes
1 answer

Import Excel Sheet in Laravel and show the extracted data in UI

I am using Angular 4 in my Front end and Laravel 5.2 in my backend.I want to import an Excel sheet from UI, store the values in DB, retrieve the values and show them in UI using Angular. I am using Maatwebsite/Excel package in laravel for this. My…
Anamik Adhikary
  • 401
  • 1
  • 8
  • 27
4
votes
3 answers

Get usable array from csvtojson

I've seen code examples of using csvtojson, but each one simply outputs the result using console.log(). The following code creates a variable named 'json', but I don't see how I can use this outside of the function creating it. How can I export the…
Tony Guinta
  • 633
  • 1
  • 8
  • 14
4
votes
1 answer

CSV(having extra quotes in field value) to array in ColdFusion

I am converting a CSV file to array using this post. Everything was working fine. But I got a file which contains extra quotes in field values like: "bash: "shortcuts" are" and "bash: \"shortcuts\" are". So I tried replacing these quotes like…
Abhishekh Gupta
  • 6,206
  • 4
  • 18
  • 46
3
votes
1 answer

Flutter web: Convert CSV to list for

There is plenty example of CSV to list for flutter apps, I'm facing issues with flutter web and the conversion of the file. Some CSV aren't working as desired, I guess that it's a formatting issue Here is the converting function when a user upload a…
Judas B
  • 33
  • 6
1
vote
1 answer

I have and error while converting CSV to Array

Is there any way of fixing this CSV error after I convert a CSV to an array? Console log the objects in the array, the last property has an error Code const csvFileToArray = (string, delimiter = ",") => { const csvHeader = string …
1
vote
1 answer

Coldfusion CSV to Excel CSVtoArray Extraneous Quotes

I've been using the ColdFusion function CSVtoArray successfully to programmatically convert CSV files into Excel files that I can then import into my database via CFSpreadsheet. Recently I ran across a data issue that the function chokes on and I'm…
Paul B
  • 11
  • 3
1
vote
2 answers

Using a Python script to create an list of dictionaries by running through csv file data

I have data in the format from to Location1 Location2 Location1 Location3 Location1 Location4 Location1 Location5 Location2 Location1 Location2 Location3 Location3 Location1 Location3 Location2 Location3 Location4 In a…
Ashok B. Raife
  • 93
  • 3
  • 11
1
vote
1 answer

Using php, how can we read 5 rows from a csv file, call another function and then read next 5 rows and repeat this?

Below is my Code. This code reads a csv file having around 100 student profiles. These profiles are displayed as a slideshow in this HTML page - http://www.depts.ttu.edu/honors/medallion-ceremony/test/. I would like to display a advertisement slide…
Priya
  • 11
  • 3
1
vote
1 answer

csv file convert to io.BytesIO object, then stream to blob storage ,meets value type error:a bytes-like object is required, not '_io.TextIOWrapper'

I am trying to stream a csv to azure blob storage, the csv is generated directly from python scripts without local copy, i have the following code, df is the csv file: with open(df,'w') as f: stream = io.BytesIO(f) stream.seek(0) …
Pepin Peng
  • 457
  • 1
  • 8
  • 21
1
vote
1 answer

How to ESCAPE delimiter character in Jackson-dataformat-csv library?

My use case was to convert an Java POJO into String so it can be passed to be published to AWS Kinesis Firehose Stream. I was writing this convertToString(), but I'm unable to find the correct way to escape delimiter. public List
dushyantashu
  • 523
  • 3
  • 9
  • 16
0
votes
1 answer

Transform CSV into an Array of Objects

I have a CSV file like this one below, I must take some different values from it, but I'm struggling in transform this CSV into an array of Objects "+++++++++ 1.2 LifeTime Cost and Emissions +++++++++","" "…
0
votes
2 answers

Regex not working in javascript split method but working Online test websites

i have this Regex (?=(?:(?:[^']*'){2})*[^']*$)\\\\n working on online test website perfectly but not in Below code. i have a string with multiple \n and also some with in " double Quotation but i want to ignore all \n with in " double Quotes. let…
Umer Rasheed
  • 138
  • 2
  • 13
0
votes
1 answer

Can't seem to merge two medium sized sparse matrices, trying to understand error

rbind fails on these two sparse matrices each, 320k rows x 31k columns, with the error that "problem too large". I was hoping someone might have some suggestions. One example below first shows attributes of each matrix, system memory, and then tries…
Alon Gelber
  • 113
  • 7
0
votes
2 answers

Split csv row and convert numeric values (Typescript, Javascript)

I'm trying to convert a csv file row to an array, and then convert the numeric values from string. This is my csv file row: const row = "TEXT,2020-06-04 06:16:34.479 UTC,179,0.629323"; And this my goal array (last two numeric values without string…
Mikel
  • 43
  • 7
0
votes
0 answers

Npm module "csv-to-array" does not read entire CSV file given as input

I am trying to read CSV file in JavaScript using npm module csv-to-array into an array. I expect the rows_in_csv array to hold all rows (count > 1000) of CSV. But it holds data for only first 507 rows. This is the issue. let fs = require('fs'); let…
Nishant Kumar
  • 363
  • 4
  • 20
1
2