"xlswrite" Generates A Negative Number for This Line
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Dear All,
I find that the following command line "xlswrite(['test.xlsx'],{'(100,100,100)'});" gives me a line of "-100,100,100" in the output "test.xlsx" file, which is not in accord with the input string. Could anyone tell me why this happens and how to fix it ?
Many thanks !
Best regards,
Gary
0 comentarios
Respuestas (1)
dpb
el 3 de Ag. de 2015
It's a fignewton of how Excel interprets the string; enclosed in the parentheses it apparently tries to convert to a numeric value and presumes the parens indicate a negative value. As for "how to fix", what do you want the result to be in Excel--that literal string, a negative currency, an array of three integers, ...?
2 comentarios
Walter Roberson
el 4 de Ag. de 2015
Perhaps
xlswrite(['test.xlsx'],{'"(100,100,100)"'});
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!