HI Amjad,
Thanks you for the files. We are validating new version. Meanwhile we came across other issues like Aspose is not able to convert attached excel file into spreadsheetml.
Aspose.Cells.Test
This file’s format is not supported or you don’t specify a correct format.
OK
code to convert is as below,
mXMLSpreadsheetFile += “Test.ss.xml”
Me.XLSFile = “O:\Prerak\EXEMPT NON EXEMPT DATA 401k Employees Paid in Year Jan-Dec 2017.xls REVISED2.xls"
mXMLSpreadsheetFile = GetValidExcelPathName(mXMLSpreadsheetFile)
Dim FileFormatInfo As FileFormatInfo = Aspose.Cells.FileFormatUtil.DetectFileFormat(Me.XLSFile)
If FileFormatInfo.LoadFormat = LoadFormat.Unknown AndAlso FileFormatInfo.FileFormatType = FileFormatType.Unknown Then
Using fileReader As StreamReader = New StreamReader(Me.mXLSFile)
EXEMPT NON EXEMPT DATA 401k Employees Paid in Year Jan-Dec 2017.xls REVISED2.zip (13.0 KB)
Dim line() As String = fileReader.ReadLine().Split(CChar(vbTab))
If line.Length > 1 Then
loadOptions = New Aspose.Cells.LoadOptions(LoadFormat.TabDelimited)
Else
loadOptions = New Aspose.Cells.LoadOptions(LoadFormat.CSV)
End If
End Using
ElseIf FileFormatInfo.LoadFormat = LoadFormat.Unknown AndAlso FileFormatInfo.FileFormatType <> FileFormatType.Unknown Then
loadOptions = New LoadOptions(LoadFormat.Auto)
Else
loadOptions = New LoadOptions(FileFormatInfo.LoadFormat)
'loadOptions.ConvertNumericData = False
End If
workBook = New Aspose.Cells.Workbook(Me.XLSFile, loadOptions)
workBook.Settings.CalcMode = Aspose.Cells.CalcModeType.Manual
For Each worksheet As Aspose.Cells.Worksheet In workBook.Worksheets
worksheet.RemoveAutoFilter()
'If loadOptions.LoadFormat = LoadFormat.TabDelimited OrElse loadOptions.LoadFormat = LoadFormat.CSV Then
' Dim worksheetName As String = IO.Path.GetFileNameWithoutExtension(Me.XLSFile)
' 'Excel Supports worksheet name upto 31 characters only
' If worksheetName.Length > 31 Then worksheetName = worksheetName.Substring(0, 31)
' worksheet.Name = worksheetName
'End If
Next
'Save spreadsheet as XML file using automation
Dim saveOptions As SpreadsheetML2003SaveOptions = New SpreadsheetML2003SaveOptions()
saveOptions.LimitAsXls = False
workBook.Save(mXMLSpreadsheetFile, SaveFormat.SpreadsheetML)
Catch ex As CellsException
MsgBox(ex.Message)
Finally
End Try
Please do needful.