Ideas and Suggestions


#1

I just wanted to write and let you know that I tried both Aspose.PDF and Aspose.Excel… Both worked great! You have done a wonderful job creating two very feature rich, functional controls.

I did have a couple of ideas and suggestions (not criticisms, just ideas that may help others)…

My development time with Aspose.Excel was much less than Aspose.PDF because of one main feature… The ability to pass a DataTable to the control and have it populate a worksheet. After doing a lot of work with the Table object provided with Aspose.PDF, I thought it would be nice if Aspose.PDF had the same ability to populate a Table object with a DataTable, similar to Aspose.Excel. Being able to pass in either a DataSet or DataTable is a real time saver when exporting data.

This suggestion is probably much more difficult… In the actual Excel application, you can select a series of columns and then double click on the border of the header and they will AutoSize… I was thinking that would be a handy feature for the Excel control. This would be a handy feature when one is utilizing the control for Dynamic Data sources.

Before I had found Aspose.PDF, I had looked at a few other ActiveX controls that facilitated the writing of PDFs… They were not near as functional as the control you’ve created, however, they offered a simplistic interface that may appeal to some programmers. A good example can be found at: http://www.colorpilot.com/pdfsamples/vb.html. My thinking was it might be nice to include a “Helper” class that allowed users to export data in a very simple fashion offering less features. I personally enjoyed the functionality provided by the control, however, I could see where less experienced developers could encounter some problems.

One thing I did encounter, which I haven’t got to trouble shoot yet was: When I passed a DataTable containing 7 Columns and around 8500 Rows to Aspose.Excel to populate a Worksheet the control seemed to lock up… My thinking was that a lot of data would take a lot of time, but after 11 minutes I assumed that something had locked up? This may be something in my code, but I wanted to throw it out there in case it was something you’d already run in to….

These are just some ideas. And again, I think you’ve done a marvelous job with both controls. Very Nice Work! I would definitely be interested in obtaining a license for both controls if you think you’ll need that much graphics work?

Many Thanks,
Danny


#2

Dear Danny,

Thanks for your consideration.

Danny, you’re so great! We’re listening to you!

Since your response involves 2 products, Aspose.Excel and Aspose.Pdf, I posted it in both forums.

In this forum, we will just address the issues for Aspose.Excel only. Please check back.


#3

Dear Danny,

Thanks for you suggestions. Your ideas are very helpful to me.

I will investigate the AutoSize function and try to implement it in a future release. Yes, it’s difficult, but I will try.

And about the lock-up problem; I will run some tests to see if it is being caused by Aspose.Excel.


#4

Dear Danny,

I created a DataTable with 7 Columns and 15000 Rows. Then I used Aspose.Excel to import it and save in a result file. After only about 15-20 seconds a 4.5M result file was created and the file was fine.

Do you mind sending your code and the designer file to me? So I can troubleshoot it to see where the problem exists.

Thanks


#5

Hey there,

Thank you for such a speedy reply! Below is a portion of the class that I am using to export to Excel.

---------------------------------------------------

’* Imports
Imports Aspose.Excel
Imports Aspose.Pdf
Imports System.Data

Public Class srExport

Private Shared ds2Export As DataSet
Private Shared dt2Export As DataTable
Private Shared sExpPath$
Private Shared sExpName$

'* This routine exports a DataSet to an Excel file
Public Shared Function Export2Excel() As Boolean

’ Variables
Dim oXL As New Aspose.Excel.Excel()
Dim oWS As Aspose.Excel.Worksheet
Dim oCells As Aspose.Excel.Cells
Dim oStyle As Styles = oXL.Styles
Dim oStyleNdx As Integer = oStyle.Add()
Dim oStyleCatName As Style = oStyle(oStyleNdx)
Dim nCnt%

’ Set CatName Style
oStyleCatName.Font.Size = 10
oStyleCatName.Font.Color = System.Drawing.Color.Navy
oStyleCatName.Font.IsBold = True
oStyleCatName.Font.Name = “Tahoma”

’ Assign Font Info
oXL.Font.Name = “Tahoma”
oXL.Font.Size = 10

’ Assign Object
oWS = oXL.Worksheets(0)
oCells = oWS.Cells

’ Export the data
oWS.Cells.ImportDataTable(dt2Export, True, 0, 0)

’ Loop Header
For nCnt = 0 To (dt2Export.Columns.Count - 1)
oCells(0, nCnt).Style = oStyleCatName
Next

’ Save the File
oXL.Save(sExpPath, SaveType.OpenInExcel)

’ Free Memory
oStyle = Nothing
oStyleNdx = Nothing
oStyleCatName = Nothing
oCells = Nothing
oWS = Nothing
oXL = Nothing

End Function

'* This is the data set to export
Property DataSet() As DataSet
Get
Return ds2Export
End Get
Set(ByVal Value As DataSet)
ds2Export = Value
End Set
End Property

'* This is the data set to export
Property DataTable() As DataTable
Get
Return dt2Export
End Get
Set(ByVal Value As DataTable)
dt2Export = Value
End Set
End Property

'* This is the data export path
Property ExportPath$()
Get
Return sExpPath
End Get
Set(ByVal Value$)
sExpPath = Value
End Set
End Property

'* This is the name of the report
Property ReportName$()
Get
Return sExpName
End Get
Set(ByVal Value$)
sExpName = Value
End Set
End Property

End Class


#6

Dear Danny,

Do you want to save the file to disk?

This line of code :

oXL.Save(sExpPath, SaveType.OpenInExcel)

Please modify it to:

oXL.Save(sExpPath, FileFormatType.Default)

If the problem still exist, please tell me the structure of dt2Export DataTable.


#7

Dear Laurence,

Once again, I’d like to thank you for the speedy reply. I tried you suggestion and everything worked perfectly! I appreciate your help very much. I apologize for the inconvenience. Aspose.Excel extremely well designed component. You guys have done a great job!

Many Thanks,
Danny Cooper


#8

Dear Danny,

Feel free to contact us if you have any questions about our products. Your ideas are important to us.