Excel 2003 to 2013 VBA migration bug

Hello!
I need to convert mission critical workbooks with much VBA code from Excel 2003 to Excel 2013, of which some were originally created using Excel 97.
When running any VBA macro I get 0x80028018 errors. A similar problem is described in KB320369 - BUG: "Old format or invalid type library"
error when automating Excel - however in my case it's
VBA, not .NET or VSTO and
I have installed the proper language packs.
I need to describe more detailed:
Even when I open the legacy workbook in 2013, create a new blank sheet, delete all old sheets and all VBA code, forms etc., put a new command button in, calling any new VBA sub, I get that error.
When I create a new workbook from scratch, put a new command button in, calling any new VBA sub, there is no error!
It also makes no difference, if I save it in compatibility mode xls or as new xlsm. See the screenshots.
I believe there is some legacy metadata in vbaProject.bin, which makes Excel 2013 choke.
Thanks!
L.
Run-Time Error Message:
Comparison of the zipped contents of "Book2", the newly created workbook, and "L_VK_1_min", the converted legacy workbook:

Hi asklucas,
Are you installing mutiple version of Excel on the same computer? Can you check the wether the reference is correct in tools-reference?
>>I believe there is some legacy metadata in vbaProject.bin, which makes Excel 2013 choke.<<
Is it helpful that conver the XLSM to XLSX, then copy the code in to XLSX and save it to XLSM back?
If not, I suggest that you create a new workbook and copy the orgial code into the new workbook as a workaround.
Event if there are many workbook, we can write an application to automate this process. Here are some helpful links for your reference:
Objects (Visual Basic Add-In Model)
OfficeTalk: Display a List of All VBA Procedures in a Workbook from the Ribbon
Hope it is helpful.
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • ? Office 2013 to support Excel 2003 (XLS) spreadsheets containing VBA CommandBars references

    Thanks in advance for reading this and offering any wisdom you have! I am not an expert in any of the following, so apologies if off base.
    The basic problem is: I need to use Excel 2013 to support Excel 2003 (XLS) spreadsheets containing VBA 'CommandBars' references which don't seem to work in Excel 2013. Details below.
    Most of our users are still using older desktop windows PCs and Office 2003!  We are beginning to upgrade to laptops running Windows 8.1 with Office 2013.  Of course, we IT technical people are using the new laptops first. These new laptops are
    64 bit.
    Years ago, someone did a lot of development with spreadsheets here in Excel 2003 file formats that automates many activities and routines. Now we with the new laptops are having to support this development using new machines.
    There is a basic compatibility issue that appears when first opening these Excel 2003 files that have VBA code that I'll detail below; I seem able to get by that problem.
    The current problem appears to be that the existing Excel 2003 VBA code has many references to: "For Each bar In Application.CommandBars". As I've learned, the Application.CommandBars VBA functionality is focused on older MS Office versions' menu
    commands, but "...Starting from Office 2007 the Fluent UI is used instead."  In other words, because MS Office isn't menu-driven beginning with version 2007 (uses 'the ribbon'), it appears that these references to: "For Each bar In Application.CommandBars"
    create a basic incompatibility to opening these spreadsheets in Office 2013.
    For a spreadsheet, after I resolve the issue detailed below and save it, when I reopen it I encounter error "Compile error: can't find project or library." 
    For example, the following code snippet:
    Private Sub Workbook_Open()
    For Each bar In Application.CommandBars
            bar.Enabled = False
        Next
    results in: "Compile error: can't find project or library." 
    (Sorry, can't include images yet, I am not a VERIFIED USER of this forum yet.)
    I went into VBE's menu: Tools>References and check for anything marked MISSING, which I deselected. But I am still receiving this error.
    I don't want to get into changing the code a lot to support both Excel 2003 and 2013 (I am no VBA expert, just a dabbler).
    And Microsoft officially says that Office 2003 is incompatible with Windows 8 although Application.CommandBars seem to be somewhat supported in Office 2013 .
    Are you aware of a quick VBA workaround to get by this?
    •I could comment out the validations, commands for: "For Each bar In Application.CommandBars" but then the spreadsheet code probably won't work for users using Office 2003.
    Alternatives would be:
    •Installing Office 2003 on my Win 8.1 64 bit laptop anyway, in spite of MS's saying incompatible, since this thread discusses at least one person has been able to use Office 2003
    •Keeping one older PC with Office 2003 on it for us to support the old Office 2003 code until everyone upgrades their systems
    Thanks
    Basic compatibility issue that seems solvable:
    Opening these spreadsheets displays this error:
    Compile error:
    The code in this project must be updated for use on 64-bit systems.
    Please review and update Declare statements and then mark them with the PtrSafe attribute.
    This seems resolvable by going into the VBA code and just adding element 'PtrSafe' where functions are declared; in other words, replacing VBA code "Declare Function" with "Declare PtrSafe Function" seems to get by this.

    Hi Allan_L,
    Please try the methods that provided above. And this is the forum to discuss questions and feedback for Microsoft Excel, your issue is related to Excel DEV, if you have further question, I recommend you post the question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Crystal 2008 and VBA in excel 2003

    We have currently crystal reports in VBA form in excel 2003 using Crystal XI Release 2. when I tried to migrate this report to "Crystal Report 2008 SP2" in VBA, I only found following reference 12.0 library
    Crystal Activex Report Viewer Library 12.0 (Crviewer.dll)
    but I couldn't find any reference library for (Craxdrt.dll) for crystal XI Release 2 it use to be
    "Crystal reports Activex Designer Run Time Library 11.5";
    so If i use 12.0 CRViewer.dll in VBA then I can create report object for it if "Craxdrt.dll"; is missing.
    thanks

    Hello,
    This is a [duplicate posting|crystal report 2008 and VBA in excel 2003;.Please do not cross post the same question to multiple forums. Here's a link to the [Rules of Engagement|http://wiki.sdn.sap.com/wiki/display/HOME/Rules%20of%20Engagement] for reference.
    Sincerely,
    Dan Kelleher

  • Excel VBA date bug

    This error was found in Excel 2010 32 bit but may be present in other versions. The error happens when writing specific dates to an Excel cell. The VBA code
    Dim datDate as Date
    datDate = CVDate(41586.9999999995)
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=datDate
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=CDbl(41586.9999999995)
    Will result in the following output to the Excel sheet
    11/8/2013 0:00
    11/9/2013 0:00
    Both dates should be 11/9/2013. The error happens when writing a date to an Excel cell when the is almost (less than a second) before midnight. The conversion of the variable from date to double precision type fixes the bug.

    Allan wrote:
    Dim datDate as Date
    datDate = CVDate(41586.9999999995)
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=datDate
    ActiveWorkbook.Sheets("Sheet1").Cells(3, 2).Value=CDbl(41586.9999999995)
    Will result in the following output to the Excel sheet
    11/8/2013 0:00
    11/9/2013 0:00
    Both dates should be 11/9/2013.
    Yes, this is a defect in the range.Value property.
    You can work around it by using the range.Value2 property.  Or by not using type Date at all.
    (Aha!  I stumbled upon another alternative.  See comments below about creating a column of date/times.)
    I always use type Double instead of type Date because VBA sometimes does "strange" things with type Date expressions.
    In the rare circumstances where VBA requires type Date, I use CDate(doubleVariable).  That does not change the internal representation of doubleVariable.
    The following might help to understand the problem. [1]
    Sub doit()
        Dim d As Date
        Columns("a:c").Clear
        d = Evaluate("value(""11/08/2013 23:59:59.499"")")
        Range("a1").Value = d
        Range("b1").Value2 = d
        Range("c1").Formula = "=b1"
        d = Evaluate("value(""11/08/2013 23:59:59.500"")")
        Range("a2").Value = d
        Range("b2").Value2 = d
        Range("c2").Formula = "=b2"
        Range("a1:b2").NumberFormat = "mm/dd/yyyy hh:mm:ss.000"
        Range("c1:c2").NumberFormat = "mm/dd/yyyy hh:mm"
        Columns("a:c").AutoFit
    End Sub
    The results are:
    A1: 11/08/2013 23:59:59.000
    B1: 11/08/2013 23:59:59.499
    C1: 11/08/2013 23:59
    A2: 11/08/2013 00:00:00.000
    B2: 11/08/2013 23:59:59.500
    C2: 11/09/2013 00:00
    Note that C2 is correct.  So the problem is in VBA, not Excel. [2]
    When VBA assigns an expression of type Date to range.Value, it rounds to the second.  (For no good reason, IMHO.)
    However, VBA makes a rookie error in the rounding:  it rounds time separately, failing to add any integer carry-over to the date.
    As demonstrated in C2, when formatting time as h, h:mm or h:mm:ss, Excel does round to the second.  But it does it correctly.
    Allan wrote:
    The value 41586.9999 is just 0.1 second short of midnight. If Excel truncated the last second instead of rounding the the date in the Excel cell should be 11/8/2013 23:59:59
    I think rounding to the second (or fraction of a second indicated by the format) is the correct thing to do.
    If Excel (and VBA) truncated to the second, we might have the following undesirable situation.
    A1:  =VALUE("11/08/2013 23:59:59")
    formatted as mm/dd/yyyy hh:mm:ss displays 11/08/2013 23:59:59
    B1:  =MOD(A1,1)
    formatted as hh:mm:ss displays 23:59:58 (!)
    because the representation of 23:59:59 in A1 is infinitesimally smaller than the time constant 23:59:59. [3]
    Allan wrote:
    The error is that when using VBA code to create a column of dates by hour you sometimes get an incorrect result in the Excel cell. I fixed this issue by adding 0.1 second to the date before writing to the Excel cell.
    Adding 0.1 might be adequate for your situation.  But in general, it works only by coincidence.
    Allan wrote:
    There are other ways to work around this bug but I think that this is the most efficient.
    That depends on how you implemented the loop, which you did not share.  Based on your previous example, I assume your "efficient" implementation is something like the following:
    Dim datDate as Date
    datDate = 41586
    For i = 1 To n
    datDate = DateAdd("h", 1, datDate)
    ActiveWorkbook.Sheets("Sheet1").Cells(20 + i, 2).Value = datDate + 0.1/86400
    Next i
    The following is probably many times faster, although you might not notice if n is very small.
    Dim d0 As Date, d As Date, v(1 To n, 1 To 1) As Date
    d0 = #11/8/2013#
    For i = 1 To n
        ' multiply to minimize "arithmetic drift": cumulative floating-point anomalies
        d = d0 + i * TimeSerial(1, 0, 0)
        ' round to the second
        v(i, 1) = Int(d * 86400 + 0.5) / 86400
    Next
    ActiveWorkbook.Sheets("Sheet1").Cells(21, 2).Resize(n, 1).Value = v
    Actually, the explicit rounding is probably redundant, considering the 1-hour increment.  It is probably sufficient for the loop to be:
    For i = 1 To n
        ' multiply to minimize "arithmetic drift": cumulative floating-point anomalies
        v(i,1) = d0 + i * TimeSerial(1, 0, 0)
    Next
    As noted above, in general, it would be better to use range.Value2 instead of range.Value.
    I use range.Value here to make an "aha!" point:  when "v" is an array, range.Value does not round or otherwise alter the assigned values.
    [EDIT] Also, I use type Date here to minimize differences and focus on "teaching" points.  Normally, I use type Double.  No reason not to.
    [1] I use Evaluate("value(""11/08/2013 23:59:59.500"")") instead of #11/08/2013 23:59:59# + 0.5/86400 because the latter is infinitesimally
    less than 11/08/2013 23:59:59.500, due to floating-point arithmetic anomalies.  So it does not demonstrate the problem because VBA correctly
    rounds down to 11/08/2013 23:59:59.
    [2] Arguably, the problem could be in Excel's handling of the data passed from VBA, set up by the range.Value property.  But that seems unlikely since I cannot think of any reason why Excel would round to the second.  Normally, it does not unless
    the cell format requires it. [EDIT] Even then, Excel rounds only for display purposes; it does not round the underlying actual value (unless the "Precision as displayed" option is set).
    [3] Arguably, we should write --TEXT(MOD(A1,1),"hh:mm:ss") instead of simply MOD(A1,1), because MOD(A1,1) is not the same internal representation.  But the point remains the same:  if Excel (and VBA) truncated to the second, that would
    result in 23:59:58 instead of 23:59:59 as expected.

  • Return String from Oracle stored proc using Excel 2003 VBA

    Hi to everyone,
    I've got a problem that remains unsolved for many days. I am trying to return a value of an oracle stored procedure using Excel VBA. It might seem trivial, however it's not for someone, who has never done it before...
    OS: Win XP SP3
    Excel 2003
    Ora Client: 11g
    By trying different things I have noticed, that I could have troubles with the ODBC-connection. Maybe I am not using the right one. To store data returned from select statements I have an ODBC-Connection (Driver: Oracle in XE), which works perfectly, e.g.:
    Sub Extract_Data()
    Dim cn As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim db_name, UserName, Password As String
    cn.Open db_name, USerName, Password
    sql_statement = "SELECT some_text FROM some_table"
    Set rs = cn.Execute(sql_statement)
    rs.MoveFirst 'jump to the first entry in the data list
    Row = 2
    While Not rs.EOF
    'save the data to a worksheet
    ip.Cells(Row, 2) = rs(0).Value
    Row = Row + 1
    rs.MoveNext
    Wend
    End Sub
    Now I need to execute a stored procedure to return a semi-colon delimited string.
    I have tried the following:
    Public Sub obj_class()
    Dim cn As New ADODB.Connection
    Dim strSQL, cn As String
    Dim adoCMD As ADODB.Command
    Dim adoRS As ADODB.Recordset
    Set wb = Excel.ActiveWorkbook
    Set ih = wb.Sheets("InfoSheet")
    cn.Open db_name, UserName, Password
    Set adoCMD = New ADODB.Command
    With adoCMD
    .ActiveConnection = cn
    .CommandText = "S#mdb$stg_da_extr_util.get_all_classes_of_classif"
    .CommandType = adCmdStoredProc
    .Parameters.Refresh
    '------ and here comes the error saying:
    '------ could not find the object in the collection corresponding to the name or ordinal reference requested by the application
    .Parameters("i_caller").Value = "'STG_DATA_REQUEST'"
    .Parameters("i_obj_classif_id").Value = 120
    Set adoRS = .Execute()
    End With
    End Sub
    I did asked on the forum:
    http://www.access-programmers.co.uk/forums/showthread.php?p=1241667#post1241667
    but unfortunately without success.
    Could it be, that my ODBC-connection is wrong? When debugging the connection string, I find the Provider=MSDASQL5.1.
    I have moderate knowledge in VBA, but absolutely a newbie with Oracle DB. Is there any source of information that can help solving this issue? Looking forward to hearing from you, as I am almost giving up... ;(

    My VBA is super rusty. Does that error come after Parameters.Refresh, or after .Parameters("i_caller").Value = "'STG_DATA_REQUEST'"?
    If it's the second one, you'll need the definition of the stored procedure so you can see what parameters it's expecting. That'd mean you're getting something wrong with the names.

  • Excel 2013 VBA Compatible with Excel 2010

    Hello,
    I am new at working with VBA and have a question regarding an excel sheet with a VBA macro inserted.
    The sheet was created in Excel 2013 by another user, and my laptop runs Excel 2010.  I get script errors when I run it, however on Excel 2013 it works fine.
    My question is: Is there a way to make Excel 2010 work with Excel 2013 VBA scripts? Perhaps importing the library from Excel 2013 VBA to E-2010?  Or perhaps a way to save a VBA script in E-2013 to be backwards compatible with E-2010?
    Thank you all for your support.

    Open the workbook.
    Select Tools > References...
    The references that are in use have their check box ticked. They are all at the top of the list. Do any of those start with MISSING?
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • DAQmx VBA for Excel 2003

    Hi,
    I'm trying to control a NI6128 via VBA. I'm using Excel 2003 and tried several of the samples I found in the developer Zone, none of them seem to run. I think there is a fundamental error somewhere.
    But, the VB6 drivers  suppose to run under VBA and that is suppose to work under Excel 2003?
    Peter

    Check out some of these links about programming in VBA.  You might have to make some of your own code, I haven't been able to get those examples to run either.
    http://digital.ni.com/public.nsf/allkb/B22FE2B0F9C8935286256E920073DA07?OpenDocument
    http://digital.ni.com/public.nsf/allkb/735848148B5B4964862571F5004692C7?OpenDocument
    http://digital.ni.com/public.nsf/websearch/B22FE2B0F9C8935286256E920073DA07?OpenDocument
    I hope that this helps.
    Applications Engineer
    National Instruments

  • Excel 2010 Pivot Table VBA Not Refreshing Table

    My company recently upgraded from Excel 2003 to 2010. I had VBA written to take source data and convert it into a number of Pivot Tables on a number of worksheets. It has been working fine for years. After upgrading to 2010 the VBA crashed. I tracked it
    down to the fact that when my code was making changes to the Pivot Tables (changing fields, filters, etc...) the pivot table on the worksheet had no data, but the fields were there. I can manually go to the pivot table and manually refresh and all the data
    comes in.
    So I tried adding the VBA code to refresh the pivot table, but the pivot tables will not refresh with data.
    I tried:
    ActiveSheet.PivotTables("WO Pivot").RefreshTable
    and
    ActiveWorkbook.RefreshAll
    And these did not work.
    I also tried recording a macro for the manual steps to refresh and got:
     ActiveSheet.PivotTables("WO Pivot").PivotCache.Refresh
    This does not work either.
    The PivotTable name is correct, but I tried using the number as well, and the name works for other code manipulating the the pivot table.
    e.g.:
    With ActiveSheet.PivotTables("WOPivot").PivotFields("Task Title")
          .Orientation = xlRowField .Position = 2
          .Subtotals = Array(False, False, False, False, False, False, False, False, False, False, _False, False)
    End
    With Why isn't this working? Is there another way to refresh pivot table data in 2010?
    Thanks. P.S. I've tried formating this so it is readable, but it comes out garbled. Hope this looks better.

    The solution above didn't work for me, but the following did the trick:
    ActiveSheet.PivotTables("WOPivot").PivotCache.Refresh
    By the way, I identified it by recording a macro, then going on the Pivot Table that needed refreshing and pressing F9 to refresh it. The line of VBA code above was the result.
    Cheers,
    Marco.

  • Can not open Excel 2003 embedded worksheet in Office 2010

    I have seen many similar issues to this but I think I have some unique factors that are making my issue a bit tougher to resolve. I have a user who has a word doc which he opens in Word 2010. This doc has several embedded excel sheets. When he tries to click
    one of these embedded excel sheets to edit he gets an error:  "the program used to create this object is excel the program is not installed on your computer". It will give an option to repair which we have tried but it makes no difference.
    Some things to note that I think makes this case more unique than others I have googled.
    This seems to be the case only with embedded excel 2003 spreedsheets. He can open newer excel 2010 spreedsheets that more more recently added to the file.
    He previously had Office 2013 which we had to uninstall, and put Office 2010 on. This was done because of a piece of software this company uses that was not compatible with office 2013. (Personally I think this may be where the problem is as there seem to
    be remnants of Office 15 in the registry.)
    I have tried the standard fixes of Disabling the Com add-ins, running office repair, and trying to Convert the embedded spreedsheet to an Excel Binary. The convert failed and gave me a generic error about possibly not being allowed to save to the location
    or needing more memory or space but none of these are the case.
    I have not yet tried to uninstall office 2010 and reinstall and I am hoping that I won't have to. This issue just seems odd to me. Other users can edit these embedded spreedsheets fine which is why I think it has something to do with the fact that he downgraded
    from 2013 to 2010.
    Anyone of thoughts, ideas, suggestions? Thanks.

    Hi,
    I noticed that use newer excel 2010
    spreadsheets that more more recently added to the file. Did you try to embed the Excel 2010 file to Word 2010 test? If it works fine, I suppose that it was a compatibility issue.
    Because Excel 2010 had change the file format with Excel 2003.
    I recommend you try to install Office 2010 sp2 and compatibility pack.
    http://blogs.technet.com/b/office_resource_kit/archive/2013/07/31/download-the-new-microsoft-visio-compatibility-pack.aspx
    https://support.microsoft.com/kb/923505/en-us
    And there is a similar issue, we also could install the hotfix to test.
    http://social.technet.microsoft.com/Forums/office/en-US/b0dc1e24-847d-44e9-95c5-f789a0d50047/cannot-edit-embedded-excels-after-closing-document?forum=officesetupdeployprevious
    Regards,
    George Zhao
    TechNet Community Support

  • Project 2010 keeps asking for Excel 2003 or later when trying produce visual reports.

    When I try to produce a visual report on project 2010, I am asked to have Excel 2003 or later installed on my computer.  I have office 2013 installed, and have looked for the Excel.exe file to move it but i was unable to find it. Any help much
    appreciated. 

    In addition to Paul's excellent advice, try this:
    Go into C:/Program Files/Microsoft Office/Office15 and copy the Excel.exe file
    Paste into C:/Program Files/Microsoft Office/Office14
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Adobe hangs Excel 2003

    I have several Windows 7 machines that are using Adobe Standard 11 as well as MS Office 2003.  My users are able to run the Excel 2003 VBA code. The code uses a DDEInitiate line and that works great until I open up Adobe 10 and do a print to Adobe to create a PDF. After creating a PDF using Adobe Converter printer the user try's to run Excel again and it hangs.  Even if we try and step through the code as soon as the line of code hits the DDEInitiate it just hangs.  The Excel document will hang for about 1 min and then give us a error saying the program has encoundered an error and stopped wording.  It seems a if the Adobe program is still running in the back ground but I can't find anything.  In order to fix this problem we have the end user re-boot.  Any Ideas?

    [discussion moved to Acrobat forum]

  • 2003-2010-2013

    I have 2003 and 2010 exchange servers in same forest.
    Also i have 2013 in another forest. And two ways trust.
    Migration from 2003 to 2010 in progress and all ok.
    Tell me please, how i must migrate from 2010 to 2013 in same time?
    Use New-MoveRequest -Remote or New-MoveRequest -RemoteLegacy or another way?

    You said you had Exchange 2003 and Exchange 2010 in one Forest (=ORG) and since there are no built-in way to migrate mailboxes directly from Exchange 2003>Exchange 2013, you would need to move the mailboxes to Exchange 2010 first and then run a Remote
    MoveRequest to migrate the mailboxes to the Exchange 2013 you have in the ORG.
    Can't give you an answer as to why RemoteLegacy was removed as an option when migrating from Exchange 2010>Exchange 2013. I would think that only the Exchange Dev Team can give you that.
    Exchange 2007>Exchange 2010/2013 = RemoteLegacy
    Exchange 2010>Exchange 2010 = Remote or Legacy MoveRequest
    Exchange 2010>Exchange 2013 = Remote Moverequest
    Martina Miskovic

  • OBIEE 11.1.1.7 Exporting to Excel 2003 and 2007 difference

    Hi
    I have a simple analysis, a couple of measures, some formatted so tat if they are negative show them as Red, minus, 1 decimal and thousand separator. Another measure is not formatted to be Red, just black, minus, 1 decimal and thousand separator.
    So ... now to the issue. When I export to Excel 2003 the measures are fine, the numbers are numbers, all fine and dandy.
    When I export to Excel 2007+ ... the red minus numbers are now text and impossible to change them all to number. I can only convert to number those that are less than 1000 ... the rest are just impossible.
    The other measures, the ones that are black, minus, 1 decimal and thousand separator ... are numbers in Excel 2007+.
    Why?
    What can I do to solve this?
    Kind Regards

    Sorry guys ... forgott to say that I'm not the one exporting to Excel ... is my business user and I cannot ask them to save the reports to another format or to cast a column or more?
    I will try them both and see what happens ... but this is something that Oracle must fix. It's the year 2013 for godness sake!! This is not a Beta software. In my opinion this is so ridiculous I can hardly find words for it hahahaha
    I have tried to cast and convert ... well that doesn't work and I found that some people are using macros to convert text to numbers in Excel ...
    Sub txttonum()
      For Each tcell In Selection.Cells
      If TypeName(tcell.Value) = "String" Then
      tcell.Value = Val(tcell.Value)
      End If
      Next
    End Sub
    As goes for the CSV option ... I just cannot ask my business user to copy from a CSV file to the Excel file they want to work on, not even if they are advanced Excel users.
    Thanks for your suggestions, I really that the cast would work ...
    Any other suggestion.

  • Excel to SQL via VBA

    Hi friends,
    While the following commands work great when launched from the T-SQL:
    SELECT 'XLS' AS [Version], * 
      from OPENROWSET('Microsoft.ACE.OLEDB.12.0',
                      'Excel 12.0; Database=C:\Users\faraz.qureshi\Desktop\OldJunk\Book1.xls; HDR=YES; IMEX=1',
                      'SELECT * from [testdata]')
    UNION ALL
    SELECT 'XLSX', * 
      from OPENROWSET('Microsoft.ACE.OLEDB.12.0',
                      'Excel 12.0; Database=C:\Users\faraz.qureshi\Desktop\OldJunk\Book1.xlsx; HDR=YES; IMEX=1',
                      'SELECT * from [testdata]');
    to import from Excel 2003 as well as Excel 2007+ both, what command could help me to achieve the same without interaction with SSMS, i.e. directly from Excel?
    In other words, suppose I have a named range in excel testrange
    how can I export the same in a new table named Test
    in a database named Test_DB that exists on a server and instance named
    MyComputer\SQL_FAQ.
    Further, is it necessary to close
    the Excel File first? Couldn't I export the selected range of Excel?
    Thanks in advance.
    Thanx in advance, Best Regards, Faraz A Qureshi

    Hi FARAZ,
    Regarding your description, Your requirement is about some programing approach to export excel to SQL Server, which is out of the queue of this forum.
    According to "via VBA" in your question, I would you suggest you post your question to a dedicated
    VBA forum. It is more appropriate and more experts will help you.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Upgarde Excel 2003 to 2007

    Hi ,
    We are dev stage and we are using MS 7.0 version with excel 2003 .
    we are planning to move excel 2003 to 2007 in comming days .
    Pls let me know what are impacts , if we  upgared excel 2003 to 2007 for BPC developument .
    Regards,
    PSR

    Hi,
    Migrating from Excel 2003 and Excel 2007 should be smooth if you take care of the reports, Input Schedules and Dimension Membersheets. Please make sure that all the reports and Input Schedules are properly resaved with correct extension like "xslx" for 2007. Also make sure you have compatibility pack installed on the users machines.
    If all of your users are being migrated at once , this would be good, in this way you can avoid the few users opening in Excel 2003 and few opening and saving in Excel 2007. Also if you are migrating in phases, then make sure that BPC Admin users who access the dimension membersheets use one version at once. Because if one Admin User makes changes to dimension sheet in 2003 and the other Admin user open the same membersheet in 2007 then you might get issues like "invalid index format" error and your dimensionsheets might get corrupted. So make sure that all Admin users use same Excel Version. If these things are taken care then migration should go smooth.
    Thanks.

Maybe you are looking for