cancel
Showing results for 
Search instead for 
Did you mean: 

Appgyver - Save EXCEL data in internal table storage

1,199

Dear Community,

I just started working with appgyver and i faced an issue while trying to convert Excel file data to data that can be stored on internal device storage.

I used the Pick files flow function to choose the Excel file from my internal storage and read file to get the file string.

How can i use this string file and transform it to data i can store in my device's internal storage ?

Thank you for your help.

Best regards,

Marouane

View Entire Topic
0 Kudos

Dear Daniel,

I'm not really familiar with Javascript, could you please give me some guidance.

The Js code i used is :

function csvJSON(input1) { const lines = input1.split("\n"); const result = []; const headers = lines[0].split(","); for (let i = 1; i < lines.length; i++) { //if (!lines[i]) //continue const obj = {}; const currentline = lines[i].split(","); for (let j = 0; j < headers.length; j++) { obj[headers[j]] = currentline[j]; }; result.push(obj); }; return JSON.stringify(result);};This code seems to be OK but still i don't have a result.I want to mention that the input is an UTF8 file string and the output is a list of objects with 2 properties.Thank you so much for your help.Best regards,Marouane