How to add data into the first row of an existing excel sheet and shift the existing data down
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Calabrese
el 21 de Ag. de 2015
Respondida: Varun Bhaskar
el 25 de Ag. de 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 comentarios
Respuesta aceptada
Varun Bhaskar
el 25 de Ag. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!