xlsx format without the com server?

1 visualización (últimos 30 días)
Anon
Anon el 29 de En. de 2020
Respondida: Anon el 17 de Abr. de 2020
I would like to set (preserve) the column widths when processing an xlsx file but I'm not using windows.
How would I set column widths in these circumstances?
Ta

Respuestas (2)

Andrew Janke
Andrew Janke el 31 de En. de 2020
You need to use a third-party library like Apache POI to do this.
Coincidentally, I'm writing an Office IO API to support use cases like this. It runs on Apache POI, so it'll work on Linux and is suitable for server-side automation. It supports setting column widths and other sheet formatting.
This library is still in preview, but the basic Excel functionality, including column widths and row heights, is working.

Anon
Anon el 17 de Abr. de 2020
Andrew,
Sorry about the delay - the original answer was to me "too complicated for now". However, I would like to get this working so that I can preserve presentational elements of the .xlsx spreadsheet while still using the matlab table format to manipulate the data.
Could you post a simple example showing how to read in the coloumns widths from the orginal .xslx file and how to set them in a new file created with writetable() please? The documentation on github is a bit minimal.
Thanks!

Categorías

Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by