OBIEE exported csv and when importing to Access I get an error

不羁岁月 提交于 2019-12-14 03:25:06

问题


I have a report on OBIEE, the date field I made it Custom format to MM-DD-YYYY I have also try [FMT:dateShort]. Once I exported to .csv I am Linking the file with MS Access 2007 and the date field I get an error #NUM! why is that ?


回答1:


Either one of these could be the problem/solution:

The #Num! in Access is telling you the cell contains a mix of data; some digitit, some text, for example: 34G (or your '-') would throw a #Num!

You need to go back to the Excel and change the format of any cell containing both numbers and text to "mixed data" then save that sheet before importing to Access.

You can do this with a Macro:

Sub Addspace() 
  Dim cell As Object 
  For Each cell In Selection 
    cell.Value = " " & cell.Value 
    cell.Value = Right(cell.Value, Len(cell.Value) - 1) 
  Next 
End Sub 

Simply highlight cells needing the formatting, run the above macro, then re-save spreadsheet.

Or:

The #Num! error value means that the value in the field is too large (either positively or negatively) to be stored in the field, based on the field's DataType or FieldSize property setting. (https://support.microsoft.com/en-us/kb/209132)

Based on your format of the dates, I would try the first fix before anything else. Date =/= Number



来源:https://stackoverflow.com/questions/29929608/obiee-exported-csv-and-when-importing-to-access-i-get-an-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!