Hello Amjad,
I succesfully worked on ListBox and deleting hidden rows also wrks fine.
Now I want to delete the unused columns,rows and also worksheets in excel.
Any suggestion will be helpful.
Thanks
Hello Amjad,
I succesfully worked on ListBox and deleting hidden rows also wrks fine.
Now I want to delete the unused columns,rows and also worksheets in excel.
Any suggestion will be helpful.
Thanks
Hi,
I'm using the below code to delete the unused sheets. I'm looping through all the sheets, but it is deleting only the 1st found unused sheet. Please let me know where i'm wrong.
Dim ws As Worksheet
For Each ws In wb.Worksheets
Dim sheetName As String = ""
sheetName = ws.Name
ws = wb.Worksheets(sheetName)
Dim lastRow As Integer
Dim lastColumn As Integer
lastColumn = ws.Cells.MaxColumn
lastRow = ws.Cells.MaxRow
If lastColumn = -1 Then
If lastRow = -1 Then
wb.Worksheets.RemoveAt(sheetName)
wb.Save(TextLine)'TextLine is the workbook name
End If
End If
Thanks in advance
Hi,
Thanks Amjad.
The deletion works for the 1st sheet and throws an exception saying " the collection is modified and can be execute".
Hi,
Please find the attached excel file.
Thanks in advance.
Hi,
Thanks Amjad, Deleting unused sheets works fine, also i have coded to delete the hidden files.
I would like to do the same without aspose.cells.
I tried but no result.
Here's my code to delete unused excel sheets and hidden excel sheets without aspose.cells
Dim i As Integer = oWorkbook.Worksheets.Count - 1
Do
Dim worksheet As Worksheet = oWorkbook.Worksheets(i)
Dim mRows As Integer = worksheet.Rows.Count
Dim mCols As Integer = worksheet.Columns.Count
If mRows = 1 And mCols = 1 Then
oWorkbook.Worksheets(i).Delete()
End If
'delete hidden sheet
If oWorkbook.Worksheets(i).Visible = False Then
oWorkbook.Worksheets(i).Delete()
'wb.Worksheets(i).VisibilityType = VisibilityType.Visible
End If
i -= 1
Loop While i >= 0
oWorkbook.Save()
'delete hidden worksheet
If oWorksheet.Visible = False Then
oWorksheet.Delete()
End If
oWorkbook.Save()
Any help/suggestions on this pls
Hi,
Hello Amjad, I understand your concerns.
I would extend my application with Aspose.cells for .Net with converting Outlook emails to pdfs.
The search sould be done within the emails to check for attachments and if .msg files found, convert them also into pdf Inside a mail folder for each parent .msg files.
Any suggestions of this?
Thanks in advance.
Hi,
Thanks for the links. Will check it.
One more query about aspose.cells.
Pls find the attached. the excel contains textbox, when conveting to pdf, the textbox is not copied to pdf.
Hi,
Thanks a lot.
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.
The issues you have found earlier (filed as CELLSNET-43907) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao
A post was split to a new topic: Show threaded comments on mouse hover in output HTML - Excel to HTML conversion