How to add data into the first row of an existing excel sheet and shift the existing data down
2 ビュー (過去 30 日間)
古いコメントを表示
I am adding data to excel daily. Originally I would add a new row to the end to many excel files and sheets using xlswrite.
- For example: if there are 200 rows, I run the code and it adds a row in the 201st spot.
I am making plots of all of this data in the excel files/sheets but unfortunately when I add a row at the end the plots wont update. If I add a row anywhere else before the end, the plots recognize it and will update. My only job now would be to sort the data in each file/sheet vs updating various parameter ranges for every plot in each file/sheet.
- For example: I would like to add a row to A1 and shift the existing 200 rows down for a total of 201 rows.
0 件のコメント
採用された回答
Varun Bhaskar
2015 年 8 月 25 日
Hi Calabrese,
This workflow is not possible with xlswrite. The workaround would be to retrieve all the rows in the Excel file into a variable in MATLAB via xlsread, then concatenate those rows to the row to be inserted right at the beginning. You can then write the whole block of data into Excel using xlswrite.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!