PHP中的Excel到PDF转换

时间:2021-10-02 08:57:00

It is asked to me to do a small excel to pdf conversion.

有人要求我做一个小的Excel转换pdf。

Let me describe what is exactly to be done. in excel file there are list of companies which looks like this... PHP中的Excel到PDF转换

让我来描述一下究竟要做什么。在excel文件中有公司列表,看起来像这样......

and to retrieve a company name turn into this in PDF format, like this...

并检索公司名称转为PDF格式,如下...

PHP中的Excel到PDF转换

I am thinking to follow a path...

我想按照一条路走......

1-using php and js I will get excel file with "input type=file"

1 - 使用php和js我将获得带有“input type = file”的excel文件

2-using pdf reader php script I will retrieve the data required.

2 - 使用pdf阅读器php脚本我将检索所需的数据。

After this I am confusing...

在此之后我很困惑......

3-I can retrieve data by searching and parsing a company name( for example getting an input: "company:A") till next keyword of "company" for all columns

3-I可以通过搜索和解析公司名称(例如获取输入:“company:A”)直到所有列的“company”的下一个关键字来检索数据

or should I put all data from excel into CSV file and do the parsing part there???

或者我应该将excel中的所有数据放入CSV文件并在那里进行解析部分???

4- after that, I am thinking to use, one of the tcpdf example methodologies however here comes another confusing point for me... because I don't know which type of output should get from excel or csv and load into pdf converter method.

4-之后,我正在考虑使用,其中一个tcpdf示例方法然而这给我带来了另一个令人困惑的地方......因为我不知道哪种类型的输出应该从excel或csv获得并加载到pdf转换器方法。

An enlightening path would be appreciated since I am confused

因为我很困惑,所以很有启发性

Regards

1 个解决方案

#1


0  

Build your Data on HTML format first then if you got the correct display on html then you can now convert it to a PDF file.

首先在HTML格式上构建数据然后如果在html上显示正确的数据,那么现在可以将其转换为PDF文件。

#1


0  

Build your Data on HTML format first then if you got the correct display on html then you can now convert it to a PDF file.

首先在HTML格式上构建数据然后如果在html上显示正确的数据,那么现在可以将其转换为PDF文件。