简体   繁体   English

我应该处理数据库中的excel还是使用aspose.cells处理它?

[英]Shall I process excel in database or process it using aspose.cells?

I am trying to upload a very large excel file potentially containing millions of records to run a name cleaning process on one of its cell columns. 我正在尝试上传一个非常大的ex​​cel文件,该文件可能包含数百万条记录,以在其单元格列之一上运行名称清理过程。 I match the column names with a particular column in a table in SQL database and then inform the user to download the processed excel file. 我将列名称与SQL数据库中表中的特定列进行匹配,然后通知用户下载已处理的excel文件。

I have multiple ways of doing it: 我有多种方法可以做到:

1) bulk copy the excel in database run the name cleaning process on the excel data in database and then extract the results from the table and write them to an excel and let the user download the excel. 1)批量复制数据库中的excel对数据库中的excel数据运行名称清理过程,然后从表中提取结果并将其写入excel,然后让用户下载excel。

2)upload the file and read it using aspose library and do the processing in memory and when once the operation is done intimate the user to download the file. 2)上传文件并使用aspose库读取文件,然后在内存中进行处理,一旦完成操作,用户便会下载文件。

I am confused right now which option would be better and if there is a better approach of doing this please feel free to share. 我现在很困惑,哪个选择更好,如果有更好的选择,请随时分享。

Any leads would be really appreciated 任何线索将不胜感激

Thanks 谢谢

As you are talking about processing millions of records in memory using Aspose.Cells, it may affect the performance and memory utilization by Aspose.Cells. 当您谈论使用Aspose.Cells处理内存中的数百万条记录时,它可能会影响Aspose.Cells的性能和内存利用率。 I think you should try both the methods and if you face some issue using Aspose.Cells, then let us know. 我认为您应该尝试这两种方法,如果您在使用Aspose.Cells时遇到问题,请告诉我们。 I suggest you use LightCells API in Aspose.Cells which is best for reading and writing large data in Excel files. 我建议您在Aspose.Cells中使用LightCells API,它最适合在Excel文件中读写大数据。

https://docs.aspose.com/display/cellsnet/Using+LightCells+API https://docs.aspose.com/display/cellsnet/Using+LightCells+API

https://docs.aspose.com/display/cellsjava/Using+LightCells+API https://docs.aspose.com/display/cellsjava/Using+LightCells+API

Similarly, Excel may also cause issue while processing large files as it takes lot of time to process large files. 同样,Excel在处理大文件时也可能会引起问题,因为处理大文件需要花费大量时间。 Its matter of test and trial both the scenario and come up with a comparison. 它对场景的测试和试验都非常重要,并且可以进行比较。

One option is that if entire column data is to be used against a column name, then better to save single column excel file as blob in database and return the ready to use Excel file as it is. 一种选择是,如果要针对列名使用整个列数据,则最好将单个列excel文件另存为数据库中的blob,然后按原样返回准备使用的Excel文件。

You may try these scenarios and provide your feedback. 您可以尝试这些方案并提供反馈。

Note: I am working as Support developer/ Evangelist at Aspose. 注意:我在Aspose担任技术支持/开发人员。

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

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