在C#.NET中从XLS复制到XLSX时,工作表副本失去格式 [英] worksheet copy looses formatting while copying from XLS to XLSX in C#.NET

查看:135
本文介绍了在C#.NET中从XLS复制到XLSX时,工作表副本失去格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们的团队将数据从excel文件表(* .XLS)复制到当前工作簿表时.复制效果很好,但是颜色和格式绝对出乎意料.

然后我们切换到先将XLS文件保存到XLSX,然后将其复制到当前工作表中,但是都一样.

这是预期的还是我可以做些什么?

when our team copies data from an excel file sheet (*.XLS) to the current workbook sheet. The copy works fine but colors and formatting go absolute unexpected.

then we switch to saving the XLS file to XLSX first and then copying it to the current worksheet but it all the same.

Is this expected or can i do something about it ? that had been a time without solution.

推荐答案

这可能是因为xls和xlsx支持的RGB和格式不同.假设xlsx中不完全支持RGB.这将导致格式丢失.您可以尝试指向要复制的Excel.Version.
Hi, that may be because that the RGB and Format supported in xls and xlsx is different. Let''s say that the RGB in xlsx is not totally supported in xls. which will cause format lose. You can try to point the Excel.Version to copy.


这篇关于在C#.NET中从XLS复制到XLSX时,工作表副本失去格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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