フィルターのクリア

How can I use xlswrite to specifically write to a cell as text?

17 ビュー (過去 30 日間)
Chris
Chris 2014 年 6 月 13 日
コメント済み: Nikolaus Koopmann 2019 年 10 月 7 日
I'm trying to write the string '0E0' to an Excel spreadsheet using xlswrite. However, Excel interprets this as a number in scientific notation. The cell appears as the number 0 in the output spreadsheet, instead of as the text "0E0". There appears to be no way to recover the original text information once in Excel (changing number format to text leaves "0" as a string). I'd like it to remain a string through the xlswrite process, otherwise the information is lost. Is there a way to do this?

採用された回答

Brian B
Brian B 2014 年 6 月 13 日
I don't have MATLAB in front if me to test it, but you could try adding a single quote before the string, as in
xlswrite('a.xlsx', {'''0E0'})
This tells Excel to interpret the value as a string.
  3 件のコメント
simith
simith 2017 年 12 月 16 日
thanks in advance
Nikolaus Koopmann
Nikolaus Koopmann 2019 年 10 月 7 日
thanks 1.2 Billion

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by