MATLAB: Is it possible to increment the column range in a for loop before writing in excel

excelimporting excel data

I guess it's easy with Matlab but I couldn't find any solution. Basically I have 67 files in excel, in each of them I have 1 column of numbers I want to copy in a single excel file i.e.:
file01.xls A1:A10 —–> copied in fileX.xls A1:A10
file02.xls A1:A10 —–> copied in fileX.xls B1:B10
file03.xls A1:A10 —–> copied in fileX.xls C1:C10
file03.xls A1:A10 —–> copied in fileX.xls D1:D10
I'm creating a for loop to read from xls files and write in fileX.xls but I don't know how to increment the letters of the range of fileX.xls
Any help?

Best Answer

Yes, but unless you're willing to wait a very long time, you should not use xlswrite. You should use ActiveX, like in my attached demo.
And you might want to use a utility that converts the column number to the Excel column letter: