如何避免“数字存储为文本”?导出到Excel时 [英] How to avoid "Numbers stored as text" when exporting to Excel

查看:211
本文介绍了如何避免“数字存储为文本”?导出到Excel时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从Access到Excel导出表格时,所有数字均显示为文本,并在单元格上带有绿色箭头。有没有一种方法可以自动修复此错误,或者有另一种方法可以解决该错误?

When I export a table from Access to Excel, all the numbers show up as text, and have that green arrow on the cell. Is there a way to automatically fix this error, or another way to export that works around the error?

作为参考,这是我的导出方法:

For reference, this is how I export:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, pages(i), outputFileName, True


推荐答案

检查表定义。将Access 导出到Excel时,只有在表的列定义为 Text 并且它包含(Excel决定是的)数字,在这种情况下,Excel是正确的:是一个以数字格式设置为文本的数字,因为它是文本(表定义是这样的。)

Check your table definition. The only time I get a "numbers stored as text" flag when exporting an Access table to Excel is when the table's column is defined as Text and it contains (something that Excel has decided is) a number, In that case Excel is correct: It is a "number" that is formatted as text because it is text (the table definition said so).

如果列确实应该 Number 访问表中的列,然后进行更改。或者,您可以进入 File>选项> Excel中的公式,并在错误检查规则下禁用数字格式为文本或以加引号开头的数字。

If the column really should be a Number column in the Access table then change it. Alternatively, you can go into File > Options > Formulas in Excel and disable "Numbers formatted as text or preceded by and apostrophe" under "Error checking rules".

这篇关于如何避免“数字存储为文本”?导出到Excel时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆