简体   繁体   English

由于字段为空,Crystal Report 导出到错误列中的 Excel 数据

[英]Crystal Report export to excel data in wrong column due to null fields

I try to export a crystal report to excel.我尝试将水晶报告导出到 excel。 The report is list of data.报告是数据列表。 Some date may be omitted but, of course, the column order must be respected.某些日期可能会被省略,但当然,必须遵守列顺序。 But with an empty field all the data are shifted to the left and the column is not right any more.但是对于空字段,所有数据都向左移动,并且该列不再正确。 How can I setup the crystal report to add empty cell for an empty data field ?如何设置水晶报告为空数据字段添加空单元格?

I put a blank text file field same height and width Over the field with the issue. 我把一个空白文本文件字段的高度和宽度放在相同的字段上。 Then moved the field to the back. 然后将场地移到后面。 It worked, all data is aligned correctly in the Excel spreadsheet. 它工作正常,所有数据都在Excel电子表格中正确对齐。

You'll need to experiment with the report's Excel-export options (File | Export | Report Export Options...). 您需要尝试使用报告的Excel导出选项(文件|导出|报告导出选项...)。 Consider 'Data Only (XLS)'. 考虑“仅数据(XLS)”。

I usually use TTX format, as it seems to work better than XLS. 我通常使用TTX格式,因为它似乎比XLS更好。

尝试添加导出选项 .ExcelUseConstantColumnWidth = false;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM