Excel如何将单元格设为文本

文章目录

在caa开发过程中遇到从CATUnicodeString转成CString时,通过SetItemText写入将ID号写入单元格,无法保存ID号中的数字0,故将单元格格式改为文本来存储。效果如下:

单元格格式为默认的"常规"时,ID号中所有的前缀 "0 "丢失:

单元格格式为"文本"时,正常:

一、打开excel文件

二、选中单元格

三、右键设置单元格格式

四、设置界面选择文本后点确定

五、其他问题

关闭开发的程序后,打开xlxs文件查看内容,若显示被锁定

说明开发的程序不直接打开编辑.xlxs的软件,而是在后台启用了其进程进行写入编辑操作,关闭开发的程序后,该进程还在,可手动结束进程或者使用C++做杀进程来解除占用。

相关推荐
UR的出不克13 小时前
使用 Python 爬取 Bilibili 弹幕数据并导出 Excel
java·python·excel
wtsolutions13 小时前
Understanding Excel Data Formats - What Excel to JSON Supports
ui·json·excel
ぁず14 小时前
excel想生成一列随机数并删除公式保留值
excel
wtsolutions17 小时前
Real-World Use Cases - How Organizations Use Excel to JSON
json·github·excel
一只小H呀の17 小时前
pandas处理excel数据
excel·pandas
wregjru17 小时前
【操作系统】3.开发工具
excel
wtsolutions20 小时前
MCP Service Integration - Excel to JSON for AI and Automation
人工智能·json·excel
wtsolutions1 天前
JSON to Excel Add-in - Seamless Integration Within Excel
json·excel
wtsolutions1 天前
Getting Started with JSON to Excel Web App - Convert in Seconds
json·excel·web app
wtsolutions1 天前
Using the JSON to Excel API - Programmatic Access for Developers
json·excel