I have been able to read a XLSM(Excel) file via vb.net and asp.net and pass data to a gridvew. That part works the problem I'm having is. Im getting a #REF! where data should be.
The Excel file works great on its own, after enabling macro contact, but I'm unable to get GridView to take in calculated data it just display #REF! instead.
Code I'm using:
Dim DBConnection = New OleDbConnection( _
ata Source=" & Server.MapPath("Staffing.x
lsm") & ";" & _
"Extended Properties=""Excel 12.0 Macro;HDR=YES;IMEX=1""")
Dim SQLString As String = "SELECT * FROM [Staffing$]"
Dim DBCommand = New OleDbCommand(SQLString, DBConnection)
Dim DBReader As Data.IDataReader = DBCommand.ExecuteReader()
gv.DataSource = DBReader
I tried with no imex same problem, screenshot attached