How to add data into the first row of an existing excel sheet and shift the existing data down
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Calabrese
il 21 Ago 2015
Risposto: Varun Bhaskar
il 25 Ago 2015
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 Commenti
Risposta accettata
Varun Bhaskar
il 25 Ago 2015
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!