excel表格乱码修复

When you copy data to Excel, from another application, blank cells in the data can cause problems. Everything looks okay, at first glance, but the database blank cells don't behave like other blank cells in the workbook. See how to fix blank Excel cells copied from a database, or created within Excel. [Updated Jan. 23, 2018: More solutions to the problem, how to see hidden data, detailed steps]

当您从另一个应用程序将数据复制到Excel时,数据中的空白单元格可能会导致问题。 乍看起来一切都很好,但是数据库空白单元格的行为不像工作簿中的其他空白单元格。 了解如何修复从数据库复制或在Excel中创建的空白Excel单元格。 [ 2018年1月23日更新 :问题的更多解决方案,如何查看隐藏数据,详细步骤]

空白单元格计数 (Blank Cells Are Counted)

In this example, there is a small table, copied from Access, with 3 cells – C4, C5 and C7 – that appear blank. In the Access database, those cells might have had a zero length string or a null value.

在此示例中,有一个从Access复制的小表,其中有3个单元格(C4,C5和C7)显示为空白。 在Access数据库中,这些单元格可能具有零长度的字符串或空值。

  • If you click on one of the "blank" cells, nothing shows in the Formula Bar.如果单击“空白”单元格之一,则在公式栏中将不显示任何内容。
  • However, the COUNTA formula in cell E2 is counting those cells, as if they contained data.但是,单元格E2中的COUNTA公式正在对那些单元格进行计数,就好像它们包含数据一样。

See more COUNTA examples, and other count functions on my Contextures site.

在我的Contextures网站上查看更多COUNTA示例和其他计数功能。

空白单元格的导航问题 (Navigation Problem with Blank Cells)

In addition to the COUNTA problem, there is a navigation problem with these cells that look empty.

除了COUNTA问题外,这些看起来空的单元格还有一个导航问题。

  • Select the first cell in the column with the blank cells选择具有空白单元格的列中的第一个单元格
  • Press the End key, and then the Down arrow按结束键,然后按向下箭头
  • Normally, Excel goes down to the last cell that contains text通常,Excel会转到包含文本的最后一个单元格
  • In this case though, Excel "sees" something in all the cells, and goes to the last cell in our list (C8)不过,在这种情况下,Excel会在所有单元格中“看到”某些内容,然后转到列表中的最后一个单元格(C8)

查看隐藏的内容 (See the Hidden Contents)

You can see apostrophes in those "non-blank" converted cells, if you turn on an Excel option:

如果打开Excel选项,则可以在那些“非空白”转换的单元格中看到撇号:

  • On the Excel Ribbon, click the File tab在Excel功能区上,单击“文件”选项卡
  • At the left, click Option在左侧,单击选项
  • In the Category list, click Advanced在类别列表中,单击高级。
  • Scroll down to the end of the Advanced options, and look for the Lotus Compatibility section向下滚动到“高级”选项的末尾,然后查找“ Lotus兼容性”部分。
  • Add a check mark to Transition Navigation Keys在过渡导航键上添加复选标记
  • Click OK, to close the Options window单击确定,关闭“选项”窗口
  • Select a cell that looks blank, and check the Formula bar选择一个看起来空白的单元格,然后检查编辑栏

You should see an apostrophe there.

您应该在那里看到一个撇号。

空白单元格问题的其他原因 (Other Causes for Blank Cells Problem)

This problem can also occur WITHOUT importing data from Microsoft Access.

如果不从Microsoft Access导入数据,也会发生此问题。

Follow these steps to create a similar situation with Excel formulas.

请按照以下步骤使用Excel公式创建类似的情况。

  • In column A, enter the numbers 1 to 10在A列中,输入数字1到10
    • The formula checks the number in column A.公式检​​查A列中的数字。
    • If it is odd, the IF function returns a 1.如果为奇数,则IF函数返回1。
    • If it is not odd, IF returns an empty string ("")如果不是奇数,则IF返回一个空字符串(“”)
  • The rows with 2, 4, 6, 8 and 10 look blank, because the formula returns an empty string ("") in those cells具有2、4、6、8和10的行看起来是空白的,因为该公式在这些单元格中返回一个空字符串(“”)

Fortunately, you can see the formula if you click on any of those cells, so it's easy to see why the cells are not really blank.

幸运的是,如果单击这些单元格中的任何一个,都可以看到公式,因此很容易看出为什么这些单元格不是真正空白。

Next, follow these steps to create the blank cells problem:

接下来,请按照以下步骤创建空白单元格问题:

  • Select all the cells with formulas选择所有带有公式的单元格
  • Copy the cells, and then Paste As Values, in the same location复制单元格,然后在同一位置粘贴为值

Now those cells for 2, 4, 6, 8 and 10 look empty, but Excel still counts them in the COUNTA formula, in cell D3. And, if you click on any of the empty string cells, the formula bar shows nothing.

现在,用于2、4、6、8和10的那些单元格看起来是空的,但是Excel仍然在单元格D3中的COUNTA公式中对其进行计数。 而且,如果您单击任何空字符串单元格,则编辑栏将不显示任何内容。

So, you can create the same issue by pasting Excel formulas as values, if some of the cells contain an empty string

因此,如果某些单元格包含空字符串,则可以通过将Excel公式粘贴为值来创建相同的问题

修复空白Excel单元格-查找和替换 (Fix Blank Excel Cells - Find and Replace)

To fix the problem, so the "blank" cells are recognized as blank, you can use the Find and Replace command, in two steps.

若要解决此问题,以便将“空白”单元格识别为空白,可以分两步使用“查找”和“替换”命令。

NOTE: You can record a macro while you fix the cells, and run that macro later, if you encounter a similar problem. See my macro code, below.

注意:您可以在修复单元格时记录宏,然后在遇到类似问题时稍后运行该宏。 请参阅下面的宏代码。

  • Select all the cells选择所有单元格
  • Press Ctrl + H to open the Find and Replace window按Ctrl + H打开“查找和替换”窗口
  • Leave the Find What box empty将“查找内容”框留空
  • In the Replace With box,type a string that is not in the data, such as "$$$$"在“替换为”框中,键入一个不在数据中的字符串,例如“ $$$$”
  • Click the Replace All button, to Replace all the blanks with $$$$单击全部替换按钮,将所有空白替换为$$$$
  • Next, put "$$$$" in the Find What box接下来,在“查找内容”框中放入“ $$$$”
  • Press the Tab key, to go the the Replace With box按Tab键,转到“替换为”框
  • With the $$$$ text selected, press the Delete key, to clear the Replace With box选择$$$文本后,按Delete键,清除“替换为”框
  • Click the Replace All button, to replace all the $$$$ entries with nothing单击全部替换按钮,以不显示任何内容替换所有的$$$$$

修复空白Excel单元格-文本到列 (Fix Blank Excel Cells - Text to Columns)

Here is another quick solution, posted by Ed Ferraro, in the comments below.

这是Ed Ferraro在以下评论中发布的另一种快速解决方案。

  • Select all the cells选择所有单元格
  • On the Excel Ribbon, click the Data tab在Excel功能区上,单击“数据”选项卡
  • Click the Text to Columns command单击“文本到列”命令
  • In Step 1, select Delimited, then click the Finish button在步骤1中,选择“定界”,然后单击“完成”按钮

That solves the problem, and you could record those steps as a macro too.

这就解决了问题,您也可以将这些步骤记录为宏。

修复空白Excel单元格-过滤器 (Fix Blank Excel Cells - Filter)

Here is another quick solution, posted by Gobish, in the comments below.

这是Gobish在以下评论中发布的另一种快速解决方案。

  • In the column heading cell, click the arrow, to see the filter options在列标题单元格中,单击箭头,以查看过滤器选项
  • Remove the check mark from (Select All)删除(全选)中的复选标记
  • Add a check mark to (Blanks)在(空白)上添加复选标记
  • Click OK点击确定
  • Select all the visible blank cells, and press the Delete key to clear them选择所有可见的空白单元格,然后按Delete键清除它们
  • To remove the filter, click the arrow in the heading cell, and click the Clear Filter command要删除过滤器,请单击标题单元格中的箭头,然后单击“清除过滤器”命令

That technique also solves the problem, and you could record those steps as a macro too.

该技术也解决了该问题,您也可以将这些步骤记录为宏。

修复空白单元格宏代码 (The Fix Blank Cells Macro Code)

Here is the Excel VBA code that fixes the blank cells, by using the Replace command. It works on the selected cells in the active worksheet. Store the macro code on a regular worksheet module.

这是通过使用“替换”命令修复空白单元格的Excel VBA代码。 它适用于活动工作表中选定的单元格。 将宏代码存储在常规工作表模块上 。

Sub FixBlankCells()
' Make blank cells from database really blank
With Selection
.Replace What:="", _
Replacement:="$$$$", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False, _
SearchFormat:=False, _
ReplaceFormat:=False
.Replace What:="$$$$", _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False, _
SearchFormat:=False, _
ReplaceFormat:=False
End With
End Sub

观看修复空白单元格视频 (Watch the Fix Blank Cells Video)

To see the steps for fixing the blank cells, and recording and running a macro, you can watch this short Excel video tutorial.

要查看修复空白单元格以及记录和运行宏的步骤,您可以观看这段简短的Excel视频教程。

演示地址

下载修复空白Excel单元格工作簿 (Download the Fix Blank Excel Cells Workbook)

To work with the sample tables, and run the macro, you can download the Fix Blank Cells in Excel sample workbook.

要使用示例表并运行宏,您可以下载Excel示例工作簿中的“ 修复空白单元格”

The file is in xlsm format, zipped, and contains macros. You'll have to enable macros to test the Fix Blank Cells code in the sample file. __________

该文件为xlsm格式,已压缩并包含宏。 您必须启用宏以测试示例文件中的“修复空白单元格”代码。 __________

翻译自: https://contexturesblog.com/archives/2011/04/13/fix-blank-excel-cells-copied-from-database/

excel表格乱码修复


http://www.taodudu.cc/news/show-1932070.html

相关文章:

  • oracle 创建表格乱码,数据库导出excel表格是乱码怎么办-oracle 导出excel 乱码怎么办...
  • excel文件修复工具_七款免费的PDF处理工具
  • java写入excel乱码_Java导出Excel解决乱码及导出文件打开不可读需修复的问题
  • php 修复excel 乱码,php下载excel乱码的解决方法
  • excel表格打开是乱码怎么办?
  • excel表格打开是乱码要如何解决?
  • 利用密码字典暴力破解渗透目标系统
  • 使用字典暴力破解练习
  • burpsuite字典破解密码
  • python暴力破解
  • 用Python写的WiFi暴力破解工具(字典),已封装!!
  • 【暴力破解】字典工具
  • 破解密码很难?利用Python自动编写暴力破解字典,黑客必学技能!
  • 使用密码字典暴力破解加密rar、zip压缩文件
  • pikachu暴力破解(burpsuite)
  • Python暴力破解附近局域网WiFi密码
  • CTF-暴力破解
  • Python基于WPA/WPA2 密码字典,实现 wifi 密码暴力破解
  • 破解日记 WiFi密码跑字典暴力破解 尽可能通俗易懂的版本
  • 【python教程入门学习】利用Python自动生成暴力破解的字典
  • SSH密码暴力破解
  • 2022-渗透测试-口令破解-几款暴力破解和字典生成的工具
  • 最详细Python批量字典暴力破解zip密码
  • DVWA high暴力破解
  • Pikachu-暴力破解
  • 暴力破解之NTscan+密码字典工具
  • 口令破解(概述、暴力破解、字典破解、Hydra)
  • kali字典暴力破解教程
  • 暴力破解和字典生成
  • 帮助小姐姐破解加密压缩包(一)——暴力破解字典生成

excel表格乱码修复_修复从数据库复制的空白Excel单元格相关推荐

  1. java导入带图片的excel表格(工具HSSFWorkbook-HSSFSheet)(支持一条数据(单元格)可以导入多个图片,)

    一个表格框可以添加多个图片 Excel表格导入数据的同时导入图片 @Transactional(rollbackFor = Exception.class)public String selectEx ...

  2. WPS无法关闭excel表格,提示:关闭窗口前请先退出编辑单元格内容或格式

    WPS无法关闭excel表格,提示关闭窗口前请先退出编辑单元格内容或格式的解决办法: 第一种:按Esc键退出编辑. 第二种:ctrl+alt+delete快捷键打开"任务管理器", ...

  3. php怎么读取excel里的数据类型,php读取excel表格数据-对PHPExcel一些简单的理解 及怎么读取单元格数据...

    php读取excel,excel下多个个工作表,该怎么读取 php读取excel,excel下多个个工作表的方法: 1.利用PHPExcelReader来完成多个excel的读取. 2.PHPExce ...

  4. 使用java导入excel表格中的内容进入到数据库中,出现excel表格的后缀名错误,如何解决。

    在学习java的过程中出现 The supplied data appears to be in the Office 2007+ XML. You are calling the part of P ...

  5. php导出表格是乱码怎么办,数据库导出excel表格是乱码怎么办-Excel表格乱码问题怎么解决?...

    POI导出excel表时文件名变成乱码怎么办 在乱码的表格上键-用记事本打 2 这里会看到里面的文字都恢复了. 3 接下来文件-另存为 4 另存的时候刻改一下文件名,这里改成1副本,格式为txt,然后 ...

  6. excel表格文件损坏怎么修复

    Excel是一款广受欢迎的电子表格程序,它提供了广泛的功能可以用来创建.编辑和存储数据.无论是在个人还是在工作场所,这款程序都是非常实用的.但是,由于一些不可避免的因素,Excel表格文件可能会损坏, ...

  7. cpp导入excel到mysql_将EXCEL表格中的数据导入mysql数据库表中

    本文转载自http://blog.sina.com.cn/s/blog_5d972ae00100gjij.html 今天项目上遇到需要将excel中的数据导入到数据库的classify表中,于是乎拼命 ...

  8. 查询oracle数据库的表格数据类型,excel表格中如何查询数据库数据类型-我想把excel表格中的数据导入oracle数据库中,想在......

    在excel表里,什么是:字段.记录.数据类型.多工... declare @t table(id numeric(18,2)) insert into @t SELECT   col1 FROM   ...

  9. php表格增加一行数据,““vb中数据库内容输出到excel如何把表格第一行合并添加一个大标题...

    excel表格上面和下面都有行怎么在中间添加一行 excel表面和下面都有行怎么在中间添加一行的方法如下: 1.打开要处理的文档, 2.标定位到要插入的位置之后,比如要在2,3行之间插入,就定位到第3 ...

  10. 导入excel表格到数据库、导入excel表格到数据库代码、根据excel表格路径将数据导入到数据库、验证要导入的excel表格数据、根据路径获取MultipartFile、FileItem文件

    导入excel表格到数据库.根据路径导入excel表格到数据库代码.根据excel表格路径将数据导入到数据库.验证要导入的excel表格数据.根据路径获取MultipartFile.FileItem文 ...

最新文章

  1. STM32开发 -- 地球坐标系(WGS84),火星坐标系(GCJ02), 百度坐标系(BD09)坐标转换
  2. 使用POI生成Excel文件,可以自动调整excel列宽 .
  3. oracle number类型_一文看懂Oracle分页实现方案的三种方式
  4. 前端学习(2620):新增品牌
  5. 【转】Win10系统创建WiFi热点的两种方法
  6. There is no more space for virtual disk .vmdk.
  7. python 删除文件 通配符_python 实现删除文件或文件夹实例详解
  8. Spark SQL External DataSource外部数据源
  9. [转]php返回json数据中文显示的问题
  10. 在Spring Boot中使用Spring Security实现权限控制
  11. 【WCF--初入江湖】12 WCF与Ajax编程
  12. 象棋人机对弈java_象棋人机对弈程序的思想
  13. 【转载】acrobat 9安装教程
  14. (二)【矩阵论】(线性表示及基与坐标)线性表示|基与维数|向量的坐标|过渡矩阵
  15. 在windows 10上使用qemu安装Windows 10虚拟机
  16. CSS中flex的用法( 学习笔记 )
  17. python实现简单的图书管理系统
  18. 未明学院学员报告:学会数据分析后,我发现美妆大牌到底哪家强 为什么是江浙沪包邮?
  19. 答题卡的计分方式_如何建立信用风险模型和记分卡
  20. 新型复读机——微信语音

热门文章

  1. java 包的package和import语句
  2. python股票交易系统实现_python实现股票自动交易,自动量化交易软件
  3. ViewFlipper使用详解
  4. CSDN怎么获取下载积分
  5. oracle 64位数据源,64位Windows 7下32位 Oracle(含XE)ODBC 数据源的配置
  6. Windows脚本bat命令
  7. 区块链技术指南pdf
  8. 盘点八个程序员必须知道的代码编辑器
  9. 安川机器人梯形图指令(一)
  10. python表白代码大全简单-python表白代码