Import excel file - Forum

Forum Navigation
You need to log in to create posts and topics.

Import excel file

Hi Luishp,

Currently we can import locally txt file in the VisualNEO App by using the below command:

LocalFileToVar "FileInput1" [content]

Is there any way to import excel file like above into a variable?

 

@asmat, as far as I know Excel files are in binary format.
Perhaps you can use LocalBinaryFileToVar command instead.

@asmat

LocalFileToVar "FileInput1" [content]
Is there any way to import excel file like above into a variable?

If you (or user) are willing to perform one additional task, you can ...

1) Save (Export) the contents of your spreadsheet using File >>> Save As (inside Excel)
2) Use ...

a) LocalFileToVar "FileInput1" [content] to read contents of csv file into a variable
b) StrParse to separate the content of cells into array variables

OK if Excel is available on the same computer running your App ... and you don't need to transfer (changing) contents frequently.

Hi @Gave,

I need to import .xlsx file into variable not csv file because, whenever i change the .xlsx file into .csv file with excel, the resulted csv file become damage which contain Persian language.

Hi luishp I have used this command:

LocalBinaryFileToVar "FileInput1" [content]

but, the result is like below.

Uploaded files:
  • You need to login to have access to uploads.

@asmat, take a look here:

https://bossanova.uk/jexcel/v3/

This library is in my list to be adapted as a plugin.
I just need time...

asmat has reacted to this post.
asmat

@asmat

whenever i change the .xlsx file into .csv file with excel, the resulted csv file become damage which contain Persian language.

The content on this page ... https://www.ablebits.com/office-addins-blog/2014/04/24/convert-excel-csv/ ... offers a work around for instances where "foreign-language contnet" messes up csv files ... i.e. save the data as a tab delimited (instead of comma separated) format ... Unicode Text (*.txt) ... see if it works for you.

luishp has reacted to this post.
luishp

Thank you Gaev, for sharing the above link ...

I have done the above way its work for me good.

Uploaded files:
  • You need to login to have access to uploads.