How to Opening a File via a Path and filename with some particular character

How to Opening a File via a Path and filename with some particular character .

If filename is book1.xls,the code below:
Dim workbook As Workbook = New Workbook(“C:\book1.xls”)

but if filename like this:
book1234781591823.xls
book123.xls

Is there a way to open a file like “book*.xls”?



Hi,

Thanks for your posting and using Aspose.Cells.

You will use the same code to open excel files having such names. I have tested this issue with the following sample code and it successfully opened the book1234781591823.xls

VB.NET


Dim filePath As String = “F:\Shak-Data-RW\Downloads\book1234781591823.xls”


Dim workbook As New Workbook(filePath)

Thank you for your e.g.

But that is not my issue.

I want to open like this

Dim filePath As String = “F:\Shak-Data-RW\Downloads\book*.xls”


Not specify the full name.


Hi,

Thanks for your clarification and using Aspose.Cells.

No, it is not possible to open file with wild characters. You will have to search the actual file name yourself having your wild characters. Once, you able to get the actual file name, you can use the same code as above to open it as a workbook object.