Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please, any help from you is welcome, how have I done to read data that is on an Excel file from Scilab, please give me the details as I am no novice in scilab ,nothing is obvious to me. Thank you very much for your help: (( ,"and excuse my english :-\ "
Posted

You tagged your question as WinXP. I assume this means this is not a programming question, but a question on how to use a file ?

SCiLab appears to be an obscure programming language. Do you mean you want to read an Excel file into SciLab ? Do you mean that SciLab has generated the file, and you want to read it ? I assume you mean you want to export data from SciLab into an Excel file. The odds of SciLab having .NET and COM support seem low to me. I'd say the best thing to do, is to generate a csv ( that is, a file with comma seperated data, like this : 1,4,5, 7, 2, 7, 9 ). Excel can read a csv and turns commans into columns and newlines into rows.
 
Share this answer
 
thank you for taking the time to answer me,I'll try to be more precise this time. well my problem is to draw a curve in 2d on scilab5.2 and data are stored in an excel file of 2colonnes and 100 lines, so i must use the read function'xls_read', but what is the arguments of this function ... how it is used and is it necessary to give the path of my exel file? thank you again
 
Share this answer
 
It would be a good idea to read the manual......

Hint: "Google"

xls_read — read a sheet in an Excel file
Calling Sequence
[Value,TextInd] = xls_read(fd,Sheetpos)
Parameters
fd

a number, the logical unit on the Excel stream returned by xls_open.
Sheetpos

a number: the position of the beginning of the sheet in the Excel stream. This position is one of those returned by xls_open.
Value

a matrix of numbers, the numerical data found in the sheet. The cell without numerical data are represented by NaN values.
TextInd

a matrix of indices with the same size as Value. The 0 indices indicates that no string exists in the correspondin Excel cell. a positive index i points to the string SST(i) where SST is given by xls_open.
Description

This function reads an Excel sheet given a logical unit on an Excel stream ant the position of the beginning of the sheet within this stream. It returns the numerical data and the strings contained by the Excel cells.

The readxls function can be used to read all an Excel file in one function with a single function call.

Warning only BIFF8 Excel files (last Excel file version) are handled
Examples

//Decode ole file, extract and open Excel stream
[fd,SST,Sheetnames,Sheetpos] = xls_open('SCI/modules/spreadsheet/demos/xls/Test1.xls')
//Read first data sheet
[Value,TextInd] = xls_read(fd,Sheetpos(1))
//close the spreadsheet stream
mclose(fd)

See Also
xls_open , readxls
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900