locked
Got Empty cell value on invalid dates RRS feed

  • Question

  • User-1823604083 posted

    Hi

    When i load the excel data into dataset using datadapet.fill method, It shows empty cell value where invalid dates are present. I want to show the error of invalid date. kindly help to me to sort the issue.


    Regards

    Kazim

    Wednesday, February 2, 2011 2:30 AM

Answers

  • User-1823604083 posted

    The solution of this problem is very simple. just add imex=1 in connection string will resolve the issue.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 17, 2011 9:26 AM

All replies

  • User535082756 posted

    hi

    what is the column datatype in the excel sheet...if it is date then make it as string...and validate it in the dataset

    hope it helps,thanks, 

    Friday, February 4, 2011 5:38 AM
  • User-1823604083 posted

    This is the main problem. Its not in my hand. User will upload the excel sheet. He/She only insert date in the column, do not change the data type of the column.

    Friday, February 4, 2011 6:05 AM
  • User269602965 posted

    Who gives them the spreadsheet?

    If you have control over the spreadsheet template,

    you can build date validation with VBA module in the the spreadsheet and warn user of bad dates as they try to input one. 

    Friday, February 4, 2011 6:54 PM
  • User-1823604083 posted

    Unfortunately as i mentined earlier, we have a public site on internet, our users can upload any excel file from file upload control.



    Sunday, February 6, 2011 11:43 PM
  • User-1823604083 posted

    The solution of this problem is very simple. just add imex=1 in connection string will resolve the issue.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 17, 2011 9:26 AM