Aspose.Grid Evaluation

Hi,

I'm a long time user of Aspose.Cells (formerly Aspose.Excel) and now have a need for something like Aspose.Grid. I have downloaded the trial and like it very much except for one thing. I am using a template for the report and it has preloaded values in some cells which write over the adjoining cells in Excel but when I load the template into Aspose.Grid those values stop at the right edge of the cell and there is a scroll button which will scroll down for the rest of the text. Can that be changed so that I can see "Favorable Variance at 95% Confidence Interval" instead of "Favora"?

Second question: When I click the save button on the trial version it does nothing. On the licensed version do you get a prompt for where to save the spreadsheet or anything like that? I want the user to be able to save the Excel sheet to their workstation.

Thanks,

Rick Schoenborn, MEDai, Inc.

Hello again!

Never mind the first part of this post. I was deleting empty rows in the excel file that apparently caused the problem. I decided to set the rowheight to 0 instead of deleting and now the text shows in full.

Thanks,

Rick

I still need to know about the save button.

Hi Rick,

For save button issue, have you tried the demos?

http://www.aspose.com/Products/Aspose.Grid/Demos/ .

Trial version does the same thing as licensed version. Please check the demos source code after you install Aspose.Grid setup msi. And you can check

for more information.

Hi, Laurence.

I did find code in the examples for the Save Event. I am having a problem with it however.

First of all, even though I load a template file from a memory stream it puts a lock on the original file and I can't edit it for 10 minutes (Sharepoint "feature").

I use the same routine to load the template that I use for loading one in Aspose.Excel. Am I doing something wrong?

Thanks,

Rick

Hi Rick,

Could you please post your code to load the template? And are you using the latest v1.7.4 of Aspose.Grid?

I downloaded the trial back in April and never used it until recently. It's version 1.5.3. I'll download the latest version today and give it a try. If I still have the problem I'll upload my code.

Thanks,

Rick

Laurence,

This is strange. I downloaded version 1.7.4 and now it only locks the template if I click the save button and open the file in Excel.

Here is the code I use to load:

Dim path As String = MapPath(".")

path = path.Substring(0, path.LastIndexOf("\"))

Dim designerFile As String = path & "\designer files\PathwaysTemplate.xls"

Dim fs1 As New FileStream(designerFile, FileMode.Open, FileAccess.Read)

Dim data1() As Byte

ReDim data1(fs1.Length)

If Not IsPostBack Then

GridWeb1.WebWorksheets.Clear()

Try

' Imports data from this stream.

fs1.Read(data1, 0, data1.Length)

fs1.Close()

Dim ms1 As MemoryStream = New MemoryStream(data1)

GridWeb1.WebWorksheets.ImportExcelFile(ms1)

ms1.Close()

p_PopulateWorksheet()

Catch e1 As Exception

Session("s_sErrorMessage") = e1.ToString

Response.Redirect("CDSSError.aspx")

End Try

End If

I used the code from the demo in the GridWeb1.SaveCommand event.

This is not a show stopper because it doesn't prevent me from creating a new webpage it just won't let me edit the file until the lock falls off.

Thanks,

Rick

Hi,

If you save back to the same file and open it in Excel, the file will be locked. So I think you may save it to another file.

Henry,

As you can see from my code the original name of the file is PathwaysTemplate.xls. When I open the file in Excel it has been changed to Pathways.xls. At that point to template is read only. Even if I don't save the newly created file to disk.

Rick

Hi,

Your code has a bug. You should put the open file stream code to the "if not IsPostBack" block. I modified the code and it works fine.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

If Not IsPostBack Then

Dim path As String = MapPath(".")

path = path.Substring(0, path.LastIndexOf("\"))

Dim designerFile As String = path & "\designer files\PathwaysTemplate.xls"

Dim fs1 As New FileStream(designerFile, FileMode.Open, FileAccess.Read)

Dim data1() As Byte

ReDim data1(fs1.Length)
GridWeb1.WebWorksheets.Clear()

Try

' Imports data from this stream.

fs1.Read(data1, 0, data1.Length)

fs1.Close()

Dim ms1 As MemoryStream = New MemoryStream(data1)

GridWeb1.WebWorksheets.ImportExcelFile(ms1)

ms1.Close()

p_PopulateWorksheet()

Catch e1 As Exception

Session("s_sErrorMessage") = e1.ToString

Response.Redirect("CDSSError.aspx")

End Try

End If

End Sub

Henry,

I prefer to refer to it as a 'Feature' rather than a 'Bug'.

Thanks, I should have seen that myself but I had my blinders on.

Rick