简体   繁体   English

如何获得合并单元格的价值?

[英]How to get the value of a merged cell?

I am working on a project which has to make pdf report from couple of Excel files. 我正在开发一个项目,必须从几个Excel文件制作pdf报告。 The files should look like this: http://img194.imageshack.us/i/24766860.jpg/ and the pdf should look like this: http://img96.imageshack.us/i/u2ntitled.jpg/ where the location column must have the value of the merged cell in the excel file(B2:E2). 文件应如下所示: http//img194.imageshack.us/i/24766860.jpg/,pdf应如下所示: http//img96.imageshack.us/i/u2ntitled.jpg/其中的位置column必须具有excel文件中合并单元格的值(B2:E2)。

So the difficulty is how to read the merged cell and put its value in the location column. 因此,难点在于如何读取合并的单元格并将其值放在位置列中。

If that info is not enough I can add the source code. 如果该信息不够,我可以添加源代码。 If you want any other info ask I'll give it right away. 如果您想要任何其他信息,请立即给我。

Merged cells in excel are read by their first cell address. excel中的合并单元格由其第一个单元格地址读取。 You should be able to pick up merged cell B2:E2 as B2 您应该能够选择合并的单元格B2:E2作为B2

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

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