MATLAB Answers

mlwnr
0

Associate filename to datastore read data

mlwnr
さんによって質問されました 2019 年 1 月 7 日
Hello,
I am reading over 2000 .xls files into a datastore:
Here is the code I wrote until now:
location = 'C:\test';
ssds = spreadsheetDatastore(location,'NumHeaderLines',1);
ssds.ReadSize = 3000;
ssds.SelectedVariableNames = 'MyName';
whatsNeeded=readall(ssds);
I know have 3000 datapoints (from over 700000) of the .xls column 'MyName' in the variable whatsNeeded.
For example:
whatsNeeded(1) = 'Number1'
whatsNeeded(2) = 'Number2'
...
whatsNeeded(172) = 'Number1'
...
whatsNeede(1583) = 'Number1'
...
whatsNeeded(3000) = 'Number1'
I now need the info, from which original file/from which filename the variables (1), (172), (1583) & (3000) came.
Is there a way to associate these information?
Thank you.

  0 件のコメント

サインイン to comment.

0 件の回答


Translated by