Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Exel in JSX

New Here ,
Jun 08, 2009 Jun 08, 2009

Hello everyone,

Is it possible to read the data from an 'Exel' database file and create an array in .jsx file using the information?

Thanks in advance

TOPICS
Actions and scripting
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Jun 09, 2009 Jun 09, 2009

You can save your Excel sheet to a CSV file and this can be read into the jsx EG:

var csvFile = File.openDialog("Open Comma-delimited File","comma-delimited(*.csv):*.csv;");
csvFile.open('r') ;
var csvString = csvFile.read();
csvFile.close();
csvString = csvString.split('\n');
for(var s = 0;s<csvString.length;s++){
var lineData = csvString.split(",");
//Process each line of data.
alert(lineData[0]);
}

Translate
Adobe
Valorous Hero ,
Jun 09, 2009 Jun 09, 2009

You can save your Excel sheet to a CSV file and this can be read into the jsx EG:

var csvFile = File.openDialog("Open Comma-delimited File","comma-delimited(*.csv):*.csv;");
csvFile.open('r') ;
var csvString = csvFile.read();
csvFile.close();
csvString = csvString.split('\n');
for(var s = 0;s<csvString.length;s++){
var lineData = csvString.split(",");
//Process each line of data.
alert(lineData[0]);
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jun 09, 2009 Jun 09, 2009

If you are on Windows you can have your javascript create a vbs script that can either create the csv file on demand or extract only the needed data. You could also use the excel ADODB driver to query the spreadsheet using sql.

Unless the sheet changes often and you need to make sure that the cvs file is always curent I would use Paul's suggestion.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 15, 2009 Jun 15, 2009
LATEST

Okay I got it....

Thank you very much....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines