如何在Excel 2013中删除单元格值的所有格式? [英] How to remove all formating of cell values in excel 2013?

查看:103
本文介绍了如何在Excel 2013中删除单元格值的所有格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用第三方插件(SheetJS)动态创建一个excel文件.它具有日期列,例如

I use a 3rd party plugin (SheetJS) to dynamically create a excel file. It has columns of dates such as

2019-07-29 04:12:44 PM

如果我将其格式化为表格,则问题是excel无法将其识别为日期列,因此我只能选择文本过滤器".但是我注意到,如果我复制日期值,粘贴到记事本中,然后从那里复制,然后粘贴回excel,然后格式化为表格,它会将其识别为显示日期过滤器"的日期列.

If I format it as a table, the problem is excel does not recognize it as a date column, so I only get "Text Filter" as an option. But I noticed that if I copy the date value, pasted in notepad, and then copy from there, and paste back into excel, and then format as table, it recognizes it as a date column showing "Date Filter".

在excel中有快速的方法吗?

Is there a quick way to do this right in excel?

谢谢

推荐答案

在SheetJS脚本中,尝试使用以下格式手动将列宽设置为17个字符:

In your SheetJS script, try to manually set your column width to 17 characters using format:

yyymmdd hh:mm:ss

yyymmdd hh:mm:ss

这将创建一个17个字符的值.这还将告诉SheetJS您定义的列是日期列,而不是纯文本.

This will create a 17 character value. This will also tell SheetJS that your column defined is a date column and not plain text.

code Snippet can be found [here][1]:


  [1]: https://jsfiddle.net/sheetjs/9xneL9wh/

这篇关于如何在Excel 2013中删除单元格值的所有格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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