简体   繁体   English

导出到Excel(ReportBuilder)时合并的单元格

[英]Merged cells when exporting to Excel (ReportBuilder)

I am using Report Builder (15.03) with Delphi XE3 for reports generating purposes. 我将带有Delphi XE3的Report Builder(15.03)用于生成报告。

In the Print Preview screen there is a printer icon on the left top corner. 在“打印预览”屏幕中,左上角有一个打印机图标。 Clicking on it opens the Print dialog where there is "Print to File" option. 单击它会打开“打印”对话框,其中有“打印到文件”选项。 Selecting the "XLS Report File" type there will exports the report to Excel file. 选择“ XLS报告文件”类型,将报告导出到Excel文件。 However if the column width is big enough it will export it into merged cells in Excel. 但是,如果列宽足够大,它将导出到Excel中的合并单元格中。 You can see on my second screenshot cells from E till F are merged. 您可以在我的第二个屏幕截图中看到从E到F合并的所有单元格。

I started face this issue only after we upgraded our Report Builder to XE3 version. 仅在将Report Builder升级到XE3版本后,我才开始遇到此问题。 In Delphi 5 version there was no problem. 在Delphi 5版本中没有问题。

Has anyone faced the same issue before? 有人遇到过同样的问题吗? Is there any way to avoid the cells merging in this case? 在这种情况下,有什么方法可以避免细胞合并?

Thank you. 谢谢。

在此处输入图片说明

在此处输入图片说明

Regards, 问候,

Alexey 阿列克谢

The cells merging can be switched of by setting: 单元格合并可以通过以下设置切换:

ppReport1.XLSSettings.MergeAdjacentCells := False;

(by default it is True). (默认情况下为True)。

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

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