locked
When Microsoft excel 2010(.xlsx) file uploading the sheet values given wrong values. RRS feed

  • Question

  • User1842677501 posted

    Dear friends,

                  When I’m going to uploading Microsoft excel 2010(.xlsx) file the sheet values are given wrong values. becoz i converted the entire sheet values are accounting format and when I’m going to read excel sheet through Microsoft.ACE.OLEDB.12.0 provider the 0 values are returns -(hyphen) values actually it's possible to Excel 2007(.xls) but here I used Microsoft.Jet.OLEDB.4.0 provider. Anybody had known this problem kindly support with me.

     

    Thanks & Regards,

    Parthiban K.

    Friday, December 26, 2014 12:35 AM

All replies

  • User269602965 posted

    Try IMEX setting in connection string IMEX = 1

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2010file.xlsx;
    Extended Properties
    ="Excel 12.0 Xml;HDR=YES;IMEX=1";

    Friday, December 26, 2014 10:39 AM
  • User1842677501 posted

    Hi Kannie,

    I aslo used this OleDbConnection provider.

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Karthick\Test Application\Remarks_Price.xlsx; Extended Properties='Excel 12.0 xml;HDR=Yes;IMEX=1'

    But That is also not working properly. kindly give me any another ideas.

    Tanks and Regards,

    Parthiban K

    Sunday, December 28, 2014 11:07 PM
  • User269602965 posted

    TRy IMEX=0

    Monday, December 29, 2014 10:49 PM
  • User1842677501 posted

    That is also not suitable to my problem...!

    Monday, December 29, 2014 11:01 PM
  • User269602965 posted

    Show your .NET code used to load the EXCEL spreadsheet into your target.

    Perhaps we can help you modify formatting of values after they are extracted from Excel.

    Thursday, January 1, 2015 5:34 PM
  • User-271186128 posted

    Hi Parthiban K,<!--?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" /--><!--?xml:namespace prefix = "u1" /--><u1:p></u1:p><!--?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" /--><o:p></o:p>

    As for this issue, I suggest you could refer to the following articles about import data from Excel into a DataSet or database.<o:p></o:p>

    Upload Excel Spreadsheet File to Server, then Display Record(s) in Gridview<o:p></o:p>

    Import Excel File to DataSet<o:p></o:p>

    Read and Import Excel Sheet into SQL Server Database in ASP.Net<o:p></o:p>

    Best Regards,
    Dillion<o:p></o:p>

    Thursday, February 12, 2015 2:41 AM