unFreezePane


#1

Hi Laurence,



I’m having a little trouble with unFreezePane (v3.7.2.0)



Dim xlwsheet As Worksheet = xlApp.Worksheets(“Level1”)

xlwsheet.UnFreezePanes()



Everything works out great until I try to open my end results which
pops up with a message saying, Error Some data may have been lost.



Any help with this would be greatly appreciated.



Michael Aparicio.



P.S. Have you had any look with my prior problem - saving file using 3.8.1.0?





#2

What happens if you don't call UnFreezePanes method?

I am checking your prior problem.


#3

Please try this attached fix to see if it solves your these two problems.


#4

Laurence,

Thank you for that fix! It fixed the problem I was having saving but it still hasn't fixed the unFreezePane problem.

If i comment out unFreezePane the solution works as it's suppose to.

This is the actually message I get when trying to open the new workbook, "File error: data may have been lost."

Thank you again for your speedy results,

Michael Aparicio


#5

Hi Michael,

Thanks for your information. I found and solved this problem. Please try this attached fix.


#6

I’m sorry Laurence but I’m still getting the error.


#7

Please check if this new dll is deployed with your application.

Could you send your file to me? I tested with an old Excel file from you and it worked fine.


#8

I’m using the dll you attached two posts ago.

I’m still getting the error. This is my code:
'------------------------- Data Tab Alterations -----------------------
Dim dataSheet As Worksheet = xlapp.Worksheets(“Data”)
dataSheet.UnFreezePanes()
dataSheet.FreezePanes(“X4”, 4, ExcelHelper.ColumnNameToIndex(“X”))


'------------------------- Calc Tab Alterations -----------------------
Dim calcSheet As Worksheet = xlapp.Worksheets(“Calc”)
calcSheet.UnFreezePanes()

I’m not sure if I’m using the FreezePanes method correctly. Attached you’ll find the workbook I’m working with.

Thanks for your help.


#9

I tried with following code and don't find any problem:

Excel excel = new Excel();
excel.Open("d:\\test\\rmr01.xls");
Worksheet dataSheet = excel.Worksheets["Data"];
dataSheet.UnFreezePanes();
dataSheet.FreezePanes("X4", 4, ExcelHelper.ColumnNameToIndex("X"));

Worksheet calcSheet = excel.Worksheets["Calc"];
calcSheet.UnFreezePanes();

excel.Save("d:\\test\\abc.xls");

Attached is output file. Could you post your output file here?


#10

what i attach here cannot be downloaded by other people, correct?


#11

Yes. Your attachment can be only downloaded by yourself and Aspose developers.


#12

Here you go. This output contains data and everything.


#13

Please try this v3.8.1.14.


#14

sorry laurence,

I’m still getting the same error.


#15

Could you please post more of your code about this problem? I cannot reproduce your problem on my machine. Thank you very much.