From: Matthew on 29 Jul 2010 16:23 I am trying to read the names of worksheets in an Excel file using the command [xlsType,xlsSheets] = xlsfinfo('myfile.xls'); xlsType gets set to 'Microsoft Excel Spreadsheet', but xlsSheets gets set to an empty cell array. I am running R2009b and Excel 2007. This problem happens with both .xls and .xlsx files. Anyone know of a solution?
From: Andy on 29 Jul 2010 16:50 "Matthew " <mibanks(a)tds.net> wrote in message <i2snvq$5nn$1(a)fred.mathworks.com>... > I am trying to read the names of worksheets in an Excel file using the command > > [xlsType,xlsSheets] = xlsfinfo('myfile.xls'); > > xlsType gets set to 'Microsoft Excel Spreadsheet', but xlsSheets gets set to an empty cell array. I am running R2009b and Excel 2007. This problem happens with both .xls and .xlsx files. Anyone know of a solution? What is in the file myfile.xls? Can you access Excel using actxserver? For the record: with R2009a, Excel 2003, your code works fine.
From: Matthew on 29 Jul 2010 22:15 "Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i2spid$j15$1(a)fred.mathworks.com>... > "Matthew " <mibanks(a)tds.net> wrote in message <i2snvq$5nn$1(a)fred.mathworks.com>... > > I am trying to read the names of worksheets in an Excel file using the command > > > > [xlsType,xlsSheets] = xlsfinfo('myfile.xls'); > > > > xlsType gets set to 'Microsoft Excel Spreadsheet', but xlsSheets gets set to an empty cell array. I am running R2009b and Excel 2007. This problem happens with both .xls and .xlsx files. Anyone know of a solution? > > What is in the file myfile.xls? Can you access Excel using actxserver? For the record: with R2009a, Excel 2003, your code works fine. Doesn't seem to matter what is in the file - same thing happens with several different files. I can't import xls files using the import wizard either. However, I can use xlsread to read in files as long as I specify the filename, range and sheet.
From: Andy on 30 Jul 2010 08:45 But can you access Excel using actxserver? The documentation for xlsfinfo says that it uses this under the hood. There was a thread recently about some problem with actxserver and (I think) Excel 2010. But it might have been about 2007 as well. I can't remember. If there's some problem with the COM server, it could be causing silent errors in xlsfinfo as well.
|
Pages: 1 Prev: mac matlab cropping off axes labels when saving Next: printing a structure array to a csv file |