EPMA Excel File Generator

I'm using 11.1.1.2 and attempting to use the Excel EPMA file generator. I'm getting all of my dimensions, however, I can not get any aliases to load. I'm loading for Planning and Essbase (BSO). All I want to do is load a Default alias but I'm getting 'Invalid Property Data Type for Property 'Alias'.'
My 'Alias' tab has just one entry:
#root|English
First, does the file generator work for aliases, and if so, what am I doing wrong?
Also, has anyone seen a sample Excel workbook for the file generator. I think that would be super helpful.
Thanks,
Michael

I haven't used the Excel ADS file format much (I use text ADS files), but one thing I've noticed is that the File Generator produces files that cannot be re-imported without manipulation. I think of the File Generator as a tool that provides "hints" regarding what your file should look like. One would hope that you could export a file using the File Generator and turn right back around and import it without errors. That isn't the case as of version 11.1.1.2.
In a text file, in the Hierarchies section, you would not have "Alias" as your heading. Instead, it would be something like "Alias=Default". I would try changing this.
In addition, you might want to add the following line to the Alias tab:
#root|Default
Hopefully this will get you a little further.
Take Care,
- Jake

Similar Messages

  • Excel file generated through SAP not opening on Smartphone

    Hi,
    My program sends an email with excel attachment (Used FM :  SO_DOCUMENT_SEND_API1).
    Receiving person able to open and view the Excel file attachments on Laptops / Desktops.
    But on Smartphone, it gives error 'Can't Open - Excel doesn't recognize the file format'.
    Please help on above problem.
    Thanks,
    Shailesh

    Hi All,
    Your expertise needed to overcome issue of opening excel file generated and send as attachment on smartphone.
    Tried program 'BCS_EXAMPLE_7' (Sending and Excel attachment) - but Excel file not opened on smartphone. (Giving error   Can't Open Excel doesn't recognize the file format 'ExcelfileName')
    If we open excel file on desktop / laptop there is no problem for opening the file.
    Thanks in advance,
    Shailesh

  • XML PUBLISHER : excel file generated is of large size

    Hi ,
    scenario: Using XML publisher I am able to get the output in the Excel format but the file size is 28.2 MB
    Issue : The file size is too big so unable to send email through XML bursting program.
    Observation:
    For the generated excel sheet when save as option is chosen then its save as type is Web Page (*.htm,*.html ) with the file name appearing in double quotes "sample.xls" , when the save as type was changed to excel and saved , the file size was found to be 5.7 MB .
    Please advise on the following:-
    xml publisher's generated output file size is 6 times bigger than the actual excel file size , is there a way to rectify this huge size output for EXCEL file.
    Regards,
    SR

    This is a know Bug, Refer below document for the patch detail & other info:
    BI Publisher Enterprise Excel Output File Size is Too Large [ID 1271544.1]
    BUG:6739943 ,7356451
    Thanks,
    Sandeep

  • How can i display a excel file generated by labview?

    hello,
    I'm looking for an exemple to display (open) a .xls file generated by labview after simulation but without use  the tookit report generation.
    somebody knows how could I do this?
    Any suggestions?
    Thanks,
    longar
    p.s: i use labview 8.6 
    Solved!
    Go to Solution.

    There is quite large dedicated Excel thread with a lot of examples.
    I'm curious though. If you don't have the toolkit, how did you create the Excel file in the first place?

  • FM to mail a excel file generated by XML

    Hi All,
    I have a requirement to generate fancy excel file as attachment in mail.
    Please help with some FM to send mail with excel as attachment,
    I have used a code like the sample code given below.
    *&----
    **& Report  ZTEST_NP_EXCEL_XML
    **&
    **& Download the formatted excel file using XML
    *&----
    report Z_IXML.
    TABLES USR02.
    TYPES XMLLINE(1024) TYPE C.
    DATA IT_XML TYPE XMLLINE OCCURS 0.
    DATA WA_XML TYPE XMLLINE.
    DATA FNAME(60) TYPE C VALUE '/ft/D02/001/test.xls'.
    \ Build-up of xml in internal table
    \\* Opening tags
    APPEND '<?xml version="1.0"?>' TO IT_XML.
    APPEND '<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"'
    TO IT_XML.
    APPEND 'xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">'
    TO IT_XML.
    APPEND ' <Worksheet ss:Name="Tabelle1">' TO IT_XML.
    APPEND ' <Table>' TO IT_XML.
    \\* The actual data from table USR02
    SELECT * FROM USR02.
    APPEND ' <Row>' TO IT_XML.
    CONCATENATE ' <Cell><Data ss:Type="String">'
    USR02-BNAME '</Data></Cell>' INTO WA_XML.
    APPEND WA_XML TO IT_XML.
    CONCATENATE ' <Cell><Data ss:Type="String">'
    USR02-TRDAT '</Data></Cell>' INTO WA_XML.
    APPEND WA_XML TO IT_XML.
    APPEND ' </Row>' TO IT_XML.
    ENDSELECT.
    \*Closing tags
    APPEND ' </Table>' TO IT_XML.
    APPEND ' </Worksheet>' TO IT_XML.
    APPEND '</Workbook>' TO IT_XML.
      DATA: window_title TYPE string,
            fullpath TYPE string,
            path TYPE string,
            user_action TYPE i,
            default_extension TYPE string,
            default_file_name TYPE string,
            file_filter TYPE  string,
            filename TYPE string,
            initialpath TYPE string.
    File selection
      MOVE '.XLS' TO default_extension.
      MOVE 'XLS files (.XLS)|.XLS' TO file_filter.
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
          default_extension = default_extension
          default_file_name = default_file_name
          file_filter       = file_filter
          initial_directory = initialpath
        CHANGING
          filename          = filename
          path              = path
          fullpath          = fullpath
          user_action       = user_action
        EXCEPTIONS
          cntl_error        = 1
          error_no_gui      = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = fullpath
          filetype                = 'ASC'
        TABLES
          data_tab                = it_xml
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          OTHERS                  = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Please help
    I am giving a sample code how

    Hi Supratik,
    Please refer to these two links:
    Send email with 1 excel file and multiple sheet
    How to Convert file to excel and send it via email
    Hope this will resolve your issue.

  • My java program can't read the EXCEL file generated by BI Publisher

    I have a program that generates excel file and another program that reads the previously generated file.
    I'm getting this error when my code reads the file using the "HSSFWorkbook" object:
    Exception in thread "main" java.io.IOException: Invalid header signature; read 3271134372600964429, expected -2226271756974174256
         at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:112)
         at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:151)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:298)
    Edited by: user1900500 on Mar 11, 2011 3:37 PM

    If you're using JDK 5 or later, you could use the Scanner class for input information. See below:
    try {
                   Scanner reader = new Scanner(new File("C:\\boot.ini"));
                   StringBuilder sb = new StringBuilder();
                   while (reader.hasNextLine()) {
                        sb.append(reader.nextLine());
                        sb.append(System.getProperty("line.separator"));
                   System.out.println(sb.toString());
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              }

  • Numbers can't open Excel files generated by SQL Reporting Services

    Hi
    I have an issue with Numbers '09 not being able top open certain Excel files. The Excel files in question are XLS files (not XLSX) and come from SQL Reporting Services. They open fine with Excel on the Mac and on Windows - but Numbers on both the Mac and iPad pops up with an "Invalid file format" when trying to open them.
    I see this as a problem with Numbers and would like to send Apple an example file so they can look at improving their Excel file support but I can't find anywhere to do this.
    Do Apple monitor these forums? Has anyone else experienced this issue?
    Thanks in advance,
    Mike.

    Thanks
    I compared the beginning of your file to the beginning of two XL ones which are on my machine (in fact, they are files created with openOffice).
    You may see that there are many differences.
    They may explain the different behaviour.
    If someone is able to drive Excel with an AppleScript,
    he may write a script opening your document in Excel,
    saving it
    opening the newly saved file in Numbers.
    As I don't own Excel, I ignore its required syntax so I can't write a clean script.
    If the XL's syntax is the same than the Numbers one, this quick and dirty one may do the trick :
    set aFile to (path to desktop as text) & "Treatment Report No Header.xls"
    tell application "System Events"
    set aName to name of disk item aFile
    end tell
    tell application "Numbers"
    open file aFile
    save document 1 (* maybe save document aName *)
    close document 1 (* maybe close document aName *)
    end tell
    tell application "Numbers"
    open aFile
    end tell
    Yvan KOENIG (VALLAURIS, France) dimanche 6 juin 2010 17:18:27

  • Save an excel file by OLE2 object

    Hi everybody,
    I wanna save an excel file generated bye ole2 objects just same as the SaveAs dialog prompt. But SaveAs prompt is not working....

    Hi,
    Before calling 'SaveAs', free all the reserved OLE objects.
    Now Save excel spreadsheet to particular filename and quit the excel application. 
    CALL METHOD OF sheet 'SaveAs'              
       EXPORTING
           #1 = 'c:\your_excel.xls'     "name of excel                                 
           #2 = 1.                                   "file format              
    Regards,
    Rajesh

  • Updating Start, Finish % Complete from excel file to Ms Project

    Hi - This is my first post on this forum which i see is a great way to share knowledge.
    I’m having a schedule which has around 3000 lines with resources names and a Responsible Person (  where individual resources
    report to) updated on the schedule.
    I need to work out a good way to get schedule updates from different parties in a efficient way.
    My thoughts are to make a solution to generate the tasks which needs to be updated based on the status date and generate a individual excel files for each responsible person and get
    their updates back in excel and update the dates and % complete back to the MS Project schedule.<o:p></o:p>
    The steps
    a) create a filter to list all the tasks which need to be updated based status date ( tasks which are in progress, tasks in the past which have not started yet,
    tasks in the past which have finished etc) grouped as per responsible person and create separate excel files for each responsible person.
    b) the excel file will contain ( UID, Task name, start date, finish date, %complete, resource name, responsible person)
    c) I would like to email these excel files to each responsible person and get their updates for (start date, finish date, %complete)
    d) Create a VBA macro to let the user to select the updated excel file and update the data back to MS Project file.
    Conditions while updating
    a)  
    Read the Excel file from Top to bottom and find the correct record based on the UID and update the "duration" in order to change dates as below
    b)  
    IF Task has started ( the excel file contains % complete and a new start date later than the MS Project start date)
    Update MS Project file ( Actual Start date and % Complete)
    c)  
    IF Task has started as Scheduled ( the excel file contain % complete and the excel file start date is equal to MS Project start date)
            Update MS Project file ( Actual Start date and % Complete)
    d)  
    IF Task has started and finished as Scheduled ( The excel file start and finish dates are equal to MS Project file but excel file % complete is now 100%)
    Update MS Project File ( Actual Start, Actual Finish and Update % Complete 100%)
    e)  
    If Start date of the task has been rescheduled to a future date ( If Excel file start date is > that Ms project start date and excel file % complete is 0)
    Update the MS Project file and inset a lag to match the excel file start date.
    I would like to know whether this would be a feasible solutions and if some of you have implemented this kind of thing please share some code snippets.
    Thanks a lot

    Hi John, I've managed to progress further on the code and Split the records as per supervisor and create excel file and email  to supervisor.
    However I ran into 2 problems
    1) The code  works some time without any error and some times it stalls. I have managed to narrow it down to the sorting code block on the
    ExportTaskstobeUpdated mehod where it Selects the Active work book which has all the data based on the filter and Sorts according to Supervisor Name+ Resource Name
    I have made the error code Bold and Italic
    The error I'm getting is
    Run-time error '1004'
    Method'Range' of object'_Global' failed
    2) Currently I'm creating the Master Excel file which is generated by the
    ExportTaskstobeUpdated method and splitting them and creating all the splits + the Master  excel file to a hard coded locationwhich is C:GESProjectEmail folder
    When Saving it Prompts to Over wright the existing files , I don't need any prompts coming out for the user.
    I've tried using the Application.DisplayAlearts=False but it does not work for me.
    In order to overcome this , I created a routine to delete the files after the files have been emailed/Saved as draft but that too fails to delete the original Master excel file.
    Is there a way to generate the excel files on the fly and without saving can I attach it to the email ?
    Or would like to know your thoughts on a better way to handle this.
    Sub ExportTaskstoBeUpdated()
    'Start Excel and create a new workbook
    'Create column titles
    'Export data and the project title
    'Tidy up
    Dim xlApp As Excel.Application
    Dim xlRange As Excel.Range
    Dim Dept As Task
    Dim Check As String
    Dim Prime As String
    Dim PrimeEmail As String
    Dim OpeningParen, ClosingParen As Integer
    'Start Excel and create a new workbook
    Set xlApp = CreateObject("Excel.Application")
    xlApp.Visible = True
    xlApp.Workbooks.Add
    'Create column titles
    Set xlRange = xlApp.Range("A1")
    With xlRange
    '.Formula = "Master Schedule Report"
    .Font.Bold = True
    .Font.Size = 12
    .Select
    End With
    xlRange.Range("A1") = "Supervisor"
    xlRange.Range("B1") = "Resource Name"
    xlRange.Range("C1") = "UID"
    xlRange.Range("D1") = "Task Name"
    xlRange.Range("E1") = "Start Date"
    xlRange.Range("F1") = "Finish Date"
    xlRange.Range("G1") = "% Completed"
    xlRange.Range("H1") = "Project"
    xlRange.Range("I1") = "Supervisor Email"
    With xlRange.Range("A1:N1")
    .Font.Bold = True
    .HorizontalAlignment = xlHAlignCenter
    .VerticalAlignment = xlVAlignCenter
    .EntireColumn.AutoFit
    .Select
    End With
    'Export data and the project title
    Set xlRange = xlRange.Range("A2") 'Set cursor to the right spot in the worksheet
    ViewApply Name:="Task Sheet" 'Get the view that has the Text11 column to filter on
    OutlineShowAllTasks 'Any hidden tasks won't be selected, so be sure all tasks are showing
    FilterApply Name:=" Telstra - CHECK 5 - Unstatused Tasks" 'This custom filter selects "External"
    SelectTaskColumn ("Text2") 'Insures the For Each loop gets all of the filtered tasks, this may be redundant
    For Each Dept In ActiveSelection.Tasks 'Pulls data for each task into spreadsheet
    If Dept.Text4 <> "" Then ' If there is no Supervisor defined ignore the Task
    With xlRange
    .Range("A1") = Dept.Text4 ' Supervisor Name, which has a Lookup , where the description on the lookup is the Supervisor Email
    .Range("B1") = Dept.ResourceNames
    .Range("C1") = Dept.Text1
    .Range("D1") = Dept.Name
    .Range("E1") = Format(Dept.Start, "dd-mmm-yyyy")
    .Range("F1") = Format(Dept.Finish, "dd-mmm-yyyy")
    .Range("G1") = Dept.PercentComplete
    .Range("H1") = ActiveProject.Name
    'This below Code Developed by John Finds the lookup description value for a custom field value
    If Dept.Text4 <> "" Then 'This is not required now since its captured above
    Dim Found As Boolean
    Dim i As Integer, NumSup As Integer
    NumSup = ActiveProject.Resources.Count
    'Once you have that set up, now you can add this code to your macro to determine the value for the "I1" range.
    On Error Resume Next
    'cycle through each item in the value list to find the one selected for this task
    For i = 1 To NumSup
    'once the item is found exit the loop
    If CustomFieldValueListGetItem(pjCustomTaskText4, pjValueListValue, i) = _
    Dept.Text4 Then
    'the loop can exit for two reasons, one, the item has been found, two,
    ' the item was not found and an error occurred. We need to distinguish between the two
    If Err = 0 Then Found = True
    Exit For
    End If
    Next
    On Error GoTo 0 'this resets the err function
    'now that the corresponding email address is found, set the Excel range value
    If Found Then
    .Range("I1") = CustomFieldValueListGetItem(pjCustomTaskText4, pjValueListDescription, i)
    Else
    .Range("I1") = "No Email Defined"
    End If
    End If
    '=====================
    End With
    Set xlRange = xlRange.Offset(1, 0) 'Point to next row
    Else
    End If
    Next Dept
    'Tidy up
    FilterApply Name:="All Tasks"
    ViewApply Name:="Task Sheet"
    With xlRange
    .Range("A1").ColumnWidth = 30
    .Range("D1").ColumnWidth = 50
    .Range("E1").ColumnWidth = 20
    .Range("F1").ColumnWidth = 20
    .Range("G1").ColumnWidth = 20
    .Range("H1").ColumnWidth = 30
    End With
    'Sort the Active work book for Supervisor Name + Resource Name
    Range("A1:I1").Select
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("A2:A500") _
    , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("B2:B500") _
    , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Sheet1").Sort
    .SetRange Range("A1:I500")
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    Set xlApp = Nothing
    'Call Method to Split to seperate files and Email
    SplitIntoSeparateFiles
    'Call the Method to delete the excel files genearated by the above method
    Deletefiles
    End Sub
    Sub SplitIntoSeparateFiles()
    '* This method Split the Master excel file which is sorted by Supervisor Name + Resource Name
    Dim OutBook, MyWorkbook As Workbook
    Dim DataSheet As Worksheet, OutSheet As Worksheet
    Dim FilterRange As Range
    Dim UniqueNames As New Collection
    Dim LastRow As Long, LastCol As Long, _
    NameCol As Long, Index As Long
    Dim OutName, MasterOutName, SupervisorEmail As String
    'set references and variables up-front for ease-of-use
    'the current workbook is the one with the primary data, more workbooks will be created later
    Set MyWorkbook = ActiveWorkbook
    Set DataSheet = ActiveSheet
    NameCol = 1 ' This is supervisor Name which will be splitted
    LastRow = DataSheet.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    LastCol = DataSheet.Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
    Set FilterRange = Range(DataSheet.Cells(1, NameCol), DataSheet.Cells(LastRow, LastCol))
    'loop through the name column and store unique names in a collection
    For Index = 2 To LastRow
    On Error Resume Next
    UniqueNames.Add Item:=DataSheet.Cells(Index, NameCol), Key:=DataSheet.Cells(Index, NameCol)
    On Error GoTo 0
    Next Index
    'iterate through the unique names collection, writing
    'to new workbooks and saving as the group name .xls
    Application.DisplayAlerts = False
    For Index = 1 To UniqueNames.Count
    Set OutBook = Workbooks.Add
    Set OutSheet = OutBook.Sheets(1)
    With FilterRange
    .AutoFilter Field:=NameCol, Criteria1:=UniqueNames(Index)
    .SpecialCells(xlCellTypeVisible).Copy OutSheet.Range("A1")
    End With
    OutName = "C:\GESProjectEmail" + "\" 'Path to Save the generated file
    SupervisorEmail = OutSheet.Range("I2") 'Supervisor Email
    MasterOutName = OutName & "Test" ' This is the First excel file generated by the ExportTasksto Be Updated Method
    OutName = OutName & UniqueNames(Index) & Trim(I2)
    Application.DisplayAlerts = False
    OutBook.SaveAs FileName:=OutName, FileFormat:=xlExcel8 'Create Excel files for each splitted files and save
    'Call Send Email method
    Send_Email_Current_Workbook (SupervisorEmail)
    OutBook.Close SaveChanges:=False
    Call ClearAllFilters(DataSheet)
    Next Index
    Application.DisplayAlerts = False
    ActiveWorkbook.SaveAs FileName:=MasterOutName, FileFormat:=xlExcel8
    ActiveWorkbook.Close SaveChanges:=False
    Application.DisplayAlerts = True
    End Sub
    Sub Send_Email_Current_Workbook(Email As String)
    Dim OutApp As Object
    Dim OutMail As Object
    Dim rng As Range
    Set OutApp = CreateObject("Outlook.Application")
    OutApp.Session.Logon
    Set OutMail = OutApp.CreateItem(0)
    On Error Resume Next
    With OutMail
    .To = Email
    .CC = ""
    .BCC = ""
    .Subject = "Project Status Update"
    .Body = "Please Update the attached file and email it back to the PM"
    .Attachments.Add ActiveWorkbook.FullName
    .Save
    End With
    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
    End Sub
    'safely clear all the filters on data sheet
    Sub ClearAllFilters(TargetSheet As Worksheet)
    With TargetSheet
    TargetSheet.AutoFilterMode = False
    If .FilterMode Then
    .ShowAllData
    End If
    End With
    End Sub
    Sub Deletefiles()
    ' This method is to delete the excel files once its saved and to avoid the DO you want to overigt message
    ' because Application.DisplayAlerts = False command still prompts the user to save
    On Error Resume Next
    Kill "C:\GESProjectEmail\*.xl*"
    On Error GoTo 0
    End Sub

  • EPMA File Generator Plug In for Excel

    Does anyone know if there are plans to make the EPMA File Generator more of a client side application that would run potentially as in conjunction with the Smart-View Excel Add-In? Right now, it appears it the file generator is restricted to those who have access to the foundation server.
    This would make Finance a lot happier and less reliable on ETL groups.

    This is installed from the EPMA system installer. This can be installed on the client, but it isn't as easy as providing them an EXE that they can simply double click.
    You could use LCM utility to automate the extracts to xml files of the hierarchies. These files can easily be opened in Excel as tables. The automation could copy the xml files to a common directory or send emails. Details on using this can be found at http://docs.oracle.com/cd/E17236_01/epm.1112/epma_batch_user/launch.html.
    You could also download the Essbase Outline Extractor, which would basically do the same thing. It would read from Essbase rather than EPMA. That can be downloaded at http://www.appliedolap.com/free-tools/outline-extractor.
    Hope that helps.
    Kyle Goodfriend
    http://www.in2hyperion.com
    Please make sure to assign helpful/answered to responses if applicable - it rewards those who help and benefits the user community.

  • EPMA Ads File generation using excel

    Hi,
    We had a classic planning application at our client and now we have decided to move on to EPMA. I have used EPMA file generator to extract ads file from Planning application & uploaded it to the shared library successfully. Now I want to add a UDA to the accounts dimension members. HOwever I want to export this file in to spreadsheet so that I can update the UDA and reload it back to the planning application.
    However the moment i open in excel & make changes the formatting messes up and loads of unnecessary commas emerge.
    Has anyone tried a better way of doing it?
    Cheers,
    XXX

    Hi,
    There are two methods to do this task:-
    Excel -
    1. Copy all the contents of the ADS file to the Excel sheet
    2. Use text to columns feature and split the properties based on the pipe separator (|)
    3. Add the lines you want to
    4. Concatenate them with the pipe separator and paste it in ADS
    Notepad ++ (I agree with Todd Johnson)
    1. Open the file in Notepad++
    2. make add the lines without making mistakes (it has a lot of rich features that improve accuracy)
    3. save it and use it.
    Thanks.

  • EPMA File Generator error

    Hi,
    I generally use the EPMA File Generator excel template to create my metadata for bulk loading into EPMA Shared Library. For some reason I have started to get errors whenever I open the excel file on my machine. I keep getting the error "Could not load an object because it is not available on this machine."
    It seems that the Macro's embedded in the file that assist in the metadata creation require some files/objects that are not available. This is the case with all other machines I've checked in my organization. I have a feeling it might be the result of a updates/patches to Office.
    Edit: Even if I don't use the macros and just update the metadata on the existing sheets (dimensions I had already created in the file) I am unable to save the changes as well. I just get the error that the file is corrupted and excel will try to recover. Once I click on OK it just says that the damage to the file was so extensive that recovery is not an option.
    Does anyone know what is causing the problem and how to fix it. If a .dll or .ocx can be downloaded and replaced somewhere just to get this file working.
    Thanks,
    Shehzad
    Edited by: shehzad k on Feb 7, 2013 12:25 PM

    Yes I tried to run it on server but still getting the same error.The Status message is:
    1 Validating EPMA import file     Successful...
    2 Generating EPMA file     Failed to generate the EPMA import file...
    Details:The remote server returned an error: (404) Not Found.

  • Not able to generate excel file locally

    Hi guys,
    My web server & database server are on 2 different systems. I am trying to generate excel file locally but the excel is getting generated on server. Output path is
        c:\\" + output + ".xls
       There is no problem anywhere else in code. If a user on any system is trying to generate excel file it's getting
    generated on server in C drive. But the excel should generate on local system of that particular user.
    Is this code fine?
    \\c:\\" + output + ".xls

    wickedrahul9 wrote:
    It's on intranet, so security is not an issue.Yes, it is. Because of the inherent security problems, servers just plain can't do that. Do you think there's an "I'm running in an intranet" flag in your server? If there was, then bad guys would just set that flag on and write malware to any client that connected. Intranets aren't an excuse for sloppy security.
    Do I need to download the file from server?That's what I said.

  • How to generate excel file in oracle forms 10g on client machine

    dear Sir,
    I am using just file server(installed 10g dev suite) not a oracle application server,
    I am running my application from another machine ,it running fine i want to generate excel report on client machine
    presently i m using OLE2 for fetching the data in excel , it is working fine but it generates the excel file on file server machine and i want get the output excel on the client machine. aftre OLE2 i m using CLIENT_OLE2 with webutil (instead of OLE2) its get compile successfully but during runtime it give error "oracle.forms.webutil.ole.OleFunctions bean not "found.CLIENT_OLE2.create_obj will not work"
    *so please tell me without oracle application server is this possible or not .*

    your webutil on server side is not configured
    you need to re install the webutil jacob.dll files etc. then it will work fine..
    you can also generate excel file using reports to change the destination format in SPREADSHEET

  • Generating Excel file using PL/SQL

    Hi,
    I wanted to generate the excel file using the below pasted PL/SQL which I have downloaded from one of the tech sites. And as I have very limited knowledge about PL/SQL I really dont know how & where I should compile this below mentioned code and get the desired O/P?
    Please reply me ASAP if anybody can help me with this?
    Please see the below code and please help me to interpret the same.
    CREATE OR REPLACE PACKAGE gen_xl_xml IS
    -- Version 0.5
    -- Objective : The main objective OF this PACKAGE IS TO CREATE excel files from PL/SQL code
    -- Requirement : Excel version 2003 onwards support XML format.
    -- The procedures does have TO be called IN specific order at this moment.
    -- expected SEQUENCE AS OF now IS
    -- At first call create_file -> It creates a FILE WITH NAME that you pass AS parameter. This PROCEDURE writes the
    -- excel file header AND some basic requirments like default style.
    -- procedures 1. create_style , create_worksheet AND write_cell can be used IN ANY SEQUENCE AS many
    -- times AS you need.
    -- When done WITH writing TO FILE call the PROCEDURE close_file
    -- CLOSE FILE --> This will actually flush the data INTO the worksheet(s) one BY one and then close the file.
    -- What colors I can use ?
    -- red , blue , green, gray , YELLOW, BROWN , PINK . lightgray ,
    debug_flag BOOLEAN := TRUE ;
    PROCEDURE create_excel( p_directory IN VARCHAR2 DEFAULT NULL , p_file_name IN VARCHAR2 DEFAULT NULL ) ;
    PROCEDURE create_excel_apps ;
    PROCEDURE create_style( p_style_name IN VARCHAR2
    , p_fontname IN VARCHAR2 DEFAULT NULL
    , p_fontcolor IN VARCHAR2 DEFAULT 'Black'
    , p_fontsize IN NUMBER DEFAULT null
    , p_bold IN BOOLEAN DEFAULT FALSE
    , p_italic IN BOOLEAN DEFAULT FALSE
    , p_underline IN VARCHAR2 DEFAULT NULL
    , p_backcolor IN VARCHAR2 DEFAULT NULL );
    PROCEDURE close_file ;
    PROCEDURE create_worksheet( p_worksheet_name IN VARCHAR2 ) ;
    PROCEDURE write_cell_num(p_row NUMBER , p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN NUMBER , p_style IN VARCHAR2 DEFAULT NULL );
    PROCEDURE write_cell_char(p_row NUMBER, p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN VARCHAR2, p_style IN VARCHAR2 DEFAULT NULL );
    PROCEDURE write_cell_null(p_row NUMBER , p_column NUMBER , p_worksheet_name IN VARCHAR2, p_style IN VARCHAR2 );
    PROCEDURE set_row_height( p_row IN NUMBER , p_height IN NUMBER, p_worksheet IN VARCHAR2 ) ;
    PROCEDURE set_column_width( p_column IN NUMBER , p_width IN NUMBER , p_worksheet IN VARCHAR2 ) ;
    END ;
    -- Package : gen_xl_sml
    -- Version : 0.62
    CREATE OR REPLACE PACKAGE Body gen_xl_xml IS
    -- worksheets must be created before it could be passed AS parameter TO the write cell procedures
    l_file utl_FILE.file_type ;
    g_apps_env VARCHAR2(1) := 'U' ; -- unset at the start
    TYPE tbl_excel_data IS TABLE OF VARCHAR2(2000) INDEX BY BINARY_INTEGER ;
    g_excel_data tbl_excel_data ;
    g_null_data tbl_excel_data ;
    g_data_count NUMBER ;
    TYPE rec_styles IS record ( s VARCHAR2(30) , def VARCHAR2(2000) );
    TYPE tbl_style IS TABLE OF rec_styles INDEX BY BINARY_INTEGER ;
    g_styles tbl_style ;
    g_null_styles tbl_style ;
    g_style_count NUMBER := 0;
    TYPE rec_worksheets IS record ( w VARCHAR2(30) , whdr VARCHAR2(300), wftr VARCHAR2(2000) );
    TYPE tbl_worksheets IS TABLE OF rec_worksheets INDEX BY BINARY_INTEGER ;
    g_worksheets tbl_worksheets ;
    g_null_worksheets tbl_worksheets ;
    g_worksheets_count NUMBER := 0;
    TYPE rec_cell_data IS record ( r NUMBER , c NUMBER , v VARCHAR2(2000) ,s VARCHAR2(30) , w VARCHAR2(100), dt VARCHAR2(8) );
    TYPE tbl_cell_data IS TABLE OF rec_cell_data INDEX BY binary_INTEGER ;
    g_cells tbl_cell_data ;
    g_null_cells tbl_cell_data ;
    g_cell_count NUMBER := 0 ;
    TYPE rec_columns_data IS record( c NUMBER, wd NUMBER, w VARCHAR2(30) ) ;
    TYPE tbl_columns_data IS TABLE OF rec_columns_data Index BY BINARY_INTEGER ;
    g_columns tbl_columns_data ;
    g_null_columns tbl_columns_data ;
    g_column_count NUMBER ;
    TYPE rec_rows_data IS record( r NUMBER, ht NUMBER , w VARCHAR2(30) ) ;
    TYPE tbl_rows_data IS TABLE OF rec_rows_data Index BY BINARY_INTEGER ;
    g_rows tbl_ROWS_data ;
    g_null_rows tbl_rows_data ;
    g_ROW_count NUMBER ;
    PROCEDURE p ( p_string IN VARCHAR2) is
    begin
    IF debug_flag = TRUE THEN
    DBMS_OUTPUT.put_line( p_string) ;
    END IF;
    END ;
    FUNCTION style_defined ( p_style IN VARCHAR2 ) RETURN BOOLEAN IS
    BEGIN
    FOR i IN 1..g_style_count LOOP
    IF g_styles(i).s = p_style THEN
    RETURN TRUE ;
    END IF;
    END LOOP ;
    RETURN FALSE ;
    END ;
    -- Function : cell_used returns : BOOLEAN
    -- Description : Cell_used FUNCTION returns TRUE IF that cell IS already used
    -- Called BY : write_Cell_char, write_cell_num
    -- ??? right now it IS NOT called BY write_Cell_null , this needs TO be evaluated
    FUNCTION cell_used ( p_r IN NUMBER , p_c IN number , p_w IN VARCHAR2 ) RETURN BOOLEAN IS
    BEGIN
    FOR i IN 1..g_cell_count LOOP
    IF ( g_cells(i).r = p_r AND g_cells(i).c = p_c AND g_cells(i).w = p_w ) THEN
    RETURN TRUE ;
    END IF;
    END LOOP ;
    RETURN FALSE ;
    END ;
    PROCEDURE initialize_collections IS
    --- following lines resets the cell data and the cell count as it was
    -- observed that the data is retained across the two runs within same seseion.
    BEGIN
    g_cells := g_null_cells ;
    g_Cell_count := 0 ;
    g_styles := g_null_styles ;
    g_style_count := 0 ;
    g_rows := g_null_rows ;
    g_ROW_count := 0 ;
    g_columns := g_null_columns ;
    g_column_count := 0 ;
    g_excel_data := g_null_data ;
    g_data_count := 0 ;
    g_apps_env := 'U';
    g_worksheets := g_null_worksheets ;
    g_worksheets_count := 0;
    END ;
    PROCEDURE create_excel_apps is
    BEGIN
    -- CHECK the env value
    IF g_apps_env = 'N' THEN
    raise_application_error( -20001 , 'You have already called create_excel ( Non Apps ) procedure, Can not set env to create_excel_apps.');
    END IF ;
    initialize_collections ;
    g_apps_env := 'Y' ;
    END ;
    PROCEDURE create_excel( p_directory IN VARCHAR2 DEFAULT NULL , p_file_name IN VARCHAR2 DEFAULT NULL )
    IS
    BEGIN
    -- CHECK the env value
    IF g_apps_env = 'Y' THEN
    raise_application_error( -20001 , 'You have already called procedure create_excel_apps , Can not set env to Non-Apps create_excel.');
    END IF ;
    initialize_collections ;
    g_apps_env := 'N' ;
    IF ( p_directory IS NULL OR p_file_name IS NULL ) THEN
    raise_application_error( -20001 , 'p_directory and p_file_name must be not null');
    END IF ;
    BEGIN
    -- Open the FILE IN the specified directory
    l_file := utl_file.fopen( p_directory, p_file_name , 'w') ;
    EXCEPTION
    WHEN utl_file.write_error THEN
    raise_application_error( -20101 , 'UTL_FILE raised write error, check if file is already open or directory access');
    WHEN utl_file.INVALID_OPERATION THEN
    raise_application_error( -20101 , 'UTL_FILE could not open file or operate on it, check if file is already open.');
    WHEN utl_file.invalid_path THEN
    raise_application_error( -20101 , 'UTL_FILE raised invalid path, check the directory passed is correct and you have access to it.');
    WHEN others THEN
    raise_application_error( -20101 , 'UTL_FILE raised others exception ');
    END ;
    p( 'File '||p_file_name ||' created successfully');
    END ;
    PROCEDURE create_style( p_style_name IN VARCHAR2
    , p_fontname IN VARCHAR2 DEFAULT NULL
    , p_fontcolor IN VARCHAR2 DEFAULT 'Black'
    , p_fontsize IN NUMBER DEFAULT null
    , p_bold IN BOOLEAN DEFAULT FALSE
    , p_italic IN BOOLEAN DEFAULT FALSE
    , p_underline IN VARCHAR2 DEFAULT NULL
    , p_backcolor IN VARCHAR2 DEFAULT NULL ) is
    l_style VARCHAR2(2000) ;
    l_font VARCHAR2(1200);
    BEGIN
    --- CHECK IF this style IS already defined AND RAISE ERROR IF yes
    IF style_defined( p_style_name ) THEN
    RAISE_application_error( -20001 , 'Style "'||p_style_name ||'" is already defined.');
    END IF;
    g_style_count := g_style_count + 1;
    ---- ??? pass ANY value OF underline AND it will only use single underlines
    -- ??? pattern IS NOT handleed
    IF upper(p_style_name) = 'DEFAULT' THEN
    RAISE_application_error( -20001 , 'Style name DEFAULT is not allowed ');
    END IF ;
    IF upper(p_style_name) IS NULL THEN
    RAISE_application_error( -20001 , 'Style name can not be null ');
    END IF ;
    g_styles(g_style_count).s := p_style_name ;
    g_styles(g_style_count).def := ' <Style ss:ID="'|| p_style_name ||'"> ' ;
    l_font := ' <Font ' ;
    IF p_fontname IS NOT NULL THEN
    l_font :=l_font || 'ss:FontName="'|| p_fontname ||'" ';
    end if ;
    IF p_fontsize is not null then
    l_font := l_font ||' ss:Size="'|| p_fontsize ||'" ';
    end if ;
    IF p_fontcolor is not null then
    l_font := l_font ||' ss:Color="'|| p_fontcolor ||'" ';
    ELSE
    l_font := l_font ||' ss:Color="Black" ';
    end if ;
    IF p_bold = TRUE THEN
    l_font := l_font ||' ss:Bold="1" ' ;
    END IF;
    IF p_italic = TRUE THEN
    l_font := l_font ||' ss:Italic="1" ' ;
    END IF;
    IF p_underline IS NOT NULL THEN
    l_font := l_font ||' ss:Underline="Single" ' ;
    END IF ;
    -- p( l_font );
    g_styles(g_style_count).def := g_styles(g_style_count).def || l_font || '/>' ;
    IF p_backcolor IS NOT NULL THEN
    g_styles(g_style_count).def := g_styles(g_style_count).def || ' <Interior ss:Color="'||p_backcolor ||'" ss:Pattern="Solid"/>' ;
    ELSE
    g_styles(g_style_count).def := g_styles(g_style_count).def || ' <Interior/>';
    END IF ;
    g_styles(g_style_count).def := g_styles(g_style_count).def || ' </Style>' ;
    --- ??? IN font there IS SOME family which IS NOT considered
    END ;
    PROCEDURE close_file IS
    l_last_row NUMBER := 0 ;
    l_dt CHAR ; -- ??? Variable TO store the datatype ; this IS NOT used at this time but may be needed IF the memory
    -- issue IS there FOR example IF there IS big array
    l_style VARCHAR2(140) ;
    l_row_change VARCHAR2(100) ;
    l_file_header VARCHAR2(2000) := '<?xml version="1.0"?>
    <?mso-application progid="Excel.Sheet"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
    <LastAuthor>a</LastAuthor>
    <Created>1996-10-14T23:33:28Z</Created>
    <LastSaved>2007-05-10T04:00:57Z</LastSaved>
    <Version>11.5606</Version>
    </DocumentProperties>
    <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
    <WindowHeight>9300</WindowHeight>
    <WindowWidth>15135</WindowWidth>
    <WindowTopX>120</WindowTopX>
    <WindowTopY>120</WindowTopY>
    <AcceptLabelsInFormulas/>
    <ProtectStructure>False</ProtectStructure>
    <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    <Styles>
    <Style ss:ID="Default" ss:Name="Normal">
    <Alignment ss:Vertical="Bottom"/>
    <Borders/>
    <Font/>
    <Interior/>
    <NumberFormat/>
    <Protection/>
    </Style>'
    BEGIN
    IF gen_xl_xml.g_Cell_count = 0 THEN
    raise_application_error( -20007 , 'No cells have been written, this version of gen_xl_xml needs at least one cell to be written');
    END IF;
    IF gen_xl_xml.g_worksheets_count = 0 THEN
    raise_application_error( -20008 , 'No worksheets have been created, this version does not support automatic worksheet creation');
    END IF;
    p( gen_xl_xml.g_Cell_count) ;
    -- Write the header xml part IN the FILE.
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := l_file_header ;
    p( 'Headers written');
    FOR i IN 1..g_style_count LOOP
    p( ' writing style number : '||i);
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := g_styles(i).def ;
    END LOOP ;
    -- CLOSE the styles tag
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Styles>' ;
    p( 'worksheet count '|| g_worksheets_count );
    FOR j IN 1..g_worksheets_count LOOP
    l_last_row := 0 ; --- FOR every worksheet we need TO CREATE START OF the row
    p( '()()------------------------------------------------------------ last row '||l_last_row );
    --- write the header first
    -- write the COLUMN widhts first
    -- write the cells
    -- write the worksheet footer
    l_row_change := NULL ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Worksheet ss:Name="'|| g_worksheets( j).w ||'"> ' ;
    p( '-------------------------------------------------------------');
    p( '****************.Generated sheet '|| g_worksheets( j).w);
    p( '-------------------------------------------------------------');
    -- write the TABLE structure ??? change the LINE here TO include tha maxrow AND cell
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Table ss:ExpandedColumnCount="16" ss:ExpandedRowCount="44315" x:FullColumns="1" x:FullRows="1">' ;
    FOR i IN 1..g_column_count LOOP
    IF g_columns(i).w = g_worksheets( j).w THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Column ss:Index="'||g_columns(i).c||'" ss:AutoFitWidth="0" ss:Width="'||g_columns(i).wd ||'"/> ' ;
    END IF;
    END LOOP ;
    -- write the cells data
    FOR i IN 1..g_cell_count LOOP ------ LOOP OF g_cell_count
    p( '()()()()()()()()()()()() '|| i);
    --- we will write only IF the cells belongs TO the worksheet that we are writing.
    IF g_cells(i).w <> g_worksheets(j).w THEN
    p( '........................Cell : W :'|| g_worksheets( j).w ||'=> r='|| g_cells(i).r ||',c ='|| g_cells(i).c||',w='|| g_cells(i).w );
    p( '...Not in this worksheet ');
    -- l_last_row := l_last_row -1 ;
    ELSE
    p( '........................Cell : W :'|| g_worksheets( j).w ||'=> r='|| g_cells(i).r ||',c ='|| g_cells(i).c||',w='|| g_cells(i).w );
    IF g_cells(i).s IS NOT NULL AND NOT style_defined( g_cells(i).s ) THEN
    -- p(g_cells(i).s) ;
    raise_application_error( -20001 , 'Style "'||g_cells(i).s ||'" is not defined, Note : Styles are case sensative and check spaces used while passing style');
    END IF;
    p( '()()------------------------------------------------------------ last row '||l_last_row );
    IF l_last_row = 0 THEN
    FOR t IN 1..g_row_count LOOP
    p( '...Height check => Row =' ||g_rows(t).r ||', w='||g_rows(t).w);
    IF g_rows(t).r = g_cells(i).r AND g_rows(t).w = g_worksheets(j).w THEN
    p( '...Changing height') ;
    l_row_change := ' ss:AutoFitHeight="0" ss:Height="'|| g_rows(t).ht||'" ' ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    l_last_row := g_cells(i).r ;
    EXIT ;
    ELSE
    p( '...NO change height') ;
    l_row_change := NULL ;
    END IF ;
    END loop ;
    IF l_ROW_CHANGE IS NULL THEN
    g_data_count := g_data_count + 1 ;
    p( '...Creating new row ');
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    l_last_row := g_cells(i).r ;
    END IF;
    END IF;
    IF g_cells(i).s IS NOT NULL THEN
    p( '...Adding style ');
    l_style := ' ss:StyleID="'||g_cells(i).s||'"' ;
    ELSE
    p( '...No style for this cell ');
    l_style := NULL ;
    END IF;
    p( '()()------------------------------------------------------------ last row '||l_last_row );
    IF g_cells(i).r <> l_last_row THEN
    p('...closing the row.'||g_cells(i).r);
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Row>' ;
    p( 'ROWCOUNT : '||g_row_count );
    FOR t IN 1..g_ROW_count LOOP
    p( '.....Height check => Row =' ||g_rows(t).r ||', w='||g_rows(t).w);
    IF g_rows(t).r = g_cells(i).r AND g_rows(t).w = g_worksheets(j).w THEN
    p( '.....Changing height') ;
    l_row_change := ' ss:AutoFitHeight="0" ss:Height="'|| g_rows(t).ht||'" ' ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    EXIT ;
    ELSE
    p( '.....NO change height') ;
    l_row_change := NULL ;
    END IF ;
    END loop ;
    -- P( 'Row :'||g_cells(i).r ||'->'|| l_ROW_CHANGE);
    IF l_row_change IS NULL THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    END IF;
    IF g_cells(i).v IS NULL THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' ></Cell>';
    ELSE
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' ><Data ss:Type="'||g_cells(i).dt ||'">'||g_cells(i).v||'</Data></Cell>';
    END IF ;
    l_last_row :=g_cells(i).r ;
    ELSE
    IF g_cells(i).v IS NULL THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' > </Cell>';
    ELSE
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' ><Data ss:Type="'||g_cells(i).dt ||'">'||g_cells(i).v||'</Data></Cell>';
    END IF ;
    END IF ;
    END IF ;
    NULL ;
    END LOOP ; -- LOOP OF g_cells_count
    p('...closing the row.');
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Row>' ;
    -- ??? does following COMMENT will have sheet NAME FOR debugging
    p( '-------------------------------------------------------------');
    p( '....End of writing cell data, closing table tag');
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Table>' ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := g_worksheets(j).wftr ;
    p( '..Closed the worksheet '|| g_worksheets( j).w );
    END LOOP ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '</Workbook>' ;
    p( 'Closed the workbook tag');
    IF g_apps_env = 'N' THEN
    FOR i IN 1..g_data_count LOOP
    utl_FILE.put_line( l_file, g_excel_data(i ));
    END LOOP ;
    utl_file.fclose( l_file );
    p( 'File closed ');
    ELSIF g_apps_env = 'Y' THEN
    FOR i IN 1..g_data_count LOOP
    fnd_file.put_line( fnd_file.output , g_excel_data(i));
    fnd_file.put_line( fnd_file.log , g_excel_data(i));
    END LOOP ;
    ELSE
    raise_application_error( -20001 , 'Env not set, ( Apps or not Apps ) Contact Support.' );
    END IF;
    END ;
    PROCEDURE create_worksheet ( p_worksheet_name IN VARCHAR2 ) IS
    BEGIN
    g_worksheets_count := g_worksheets_count + 1 ;
    g_worksheets(g_worksheets_count).w := p_worksheet_name ;
    g_worksheets(g_worksheets_count).whdr := '<Worksheet ss:Name=" ' || p_worksheet_name ||' ">' ;
    g_worksheets(g_worksheets_count).wftr := '<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
    <ProtectObjects>False</ProtectObjects>
    <ProtectScenarios>False</ProtectScenarios>
    </WorksheetOptions>
    </Worksheet>' ;
    END ;
    PROCEDURE write_cell_char(p_row NUMBER, p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN VARCHAR2, p_style IN VARCHAR2 DEFAULT NULL ) IS
    l_ws_exist BOOLEAN ;
    l_worksheet VARCHAR2(2000) ;
    BEGIN
    -- CHECK IF this cell has been used previously.
    IF cell_used( p_row , p_column , p_worksheet_name ) THEN
    RAISE_application_error( -20001 , 'The cell ( Row: '||p_row ||' Column:'||p_column ||' Worksheet:'||p_worksheet_name ||') is already used.Check if you have missed to increment row number in your code. ');
    END IF;
    -- IF worksheet NAME IS NOT passed THEN use first USER created sheet ELSE use DEFAULT sheet
    -- this PROCEDURE just adds the data INTO the g_cells TABLE
    g_cell_count := g_cell_count + 1 ;
    g_cells( g_cell_count ).r := p_row ;
    g_cells( g_cell_count ).c := p_column ;
    g_cells( g_cell_count ).v := p_value ;
    g_cells( g_cell_count ).w := p_worksheet_name ;
    g_cells( g_cell_count ).s := p_style ;
    g_cells( g_cell_count ).dt := 'String' ;
    END ;
    PROCEDURE write_cell_num(p_row NUMBER , p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN NUMBER , p_style IN VARCHAR2 DEFAULT NULL ) IS
    l_ws_exist BOOLEAN ;
    l_worksheet VARCHAR2(2000) ;
    BEGIN
    -- ??? IF worksheet NAME IS NOT passed THEN use first USER created sheet ELSE use DEFAULT sheet
    -- this PROCEDURE just adds the data INTO the g_cells TABLE
    -- CHECK IF this cell has been used previously.
    IF cell_used( p_row , p_column , p_worksheet_name ) THEN
    RAISE_application_error( -20001 , 'The cell ( Row: '||p_row ||' Column:'||p_column ||' Worksheet:'||p_worksheet_name ||') is already used. Check if you have missed to increment row number in your code.');
    END IF;
    g_cell_count := g_cell_count + 1 ;
    g_cells( g_cell_count ).r := p_row ;
    g_cells( g_cell_count ).c := p_column ;
    g_cells( g_cell_count ).v := p_value ;
    g_cells( g_cell_count ).w := p_worksheet_name ;
    g_cells( g_cell_count ).s := p_style ;
    g_cells( g_cell_count ).dt := 'Number' ;
    END ;
    PROCEDURE write_cell_null(p_row NUMBER , p_column NUMBER , p_worksheet_name IN VARCHAR2, p_style IN VARCHAR2 ) IS
    BEGIN
    -- ???? NULL IS allowed here FOR time being. one OPTION IS TO warn USER that NULL IS passed but otherwise
    -- the excel generates without error
    g_cell_count := g_cell_count + 1 ;
    g_cells( g_cell_count ).r := p_row ;
    g_cells( g_cell_count ).c := p_column ;
    g_cells( g_cell_count ).v := null ;
    g_cells( g_cell_count ).w := p_worksheet_name ;
    g_cells( g_cell_count ).s := p_style ;
    g_cells( g_cell_count ).dt := NULL ;
    END ;
    PROCEDURE set_row_height( p_row IN NUMBER , p_height IN NUMBER, p_worksheet IN VARCHAR2 ) IS
    BEGIN
    g_ROW_count := g_ROW_count + 1 ;
    g_rows( g_row_count ).r := p_row ;
    g_rows( g_row_count ).ht := p_height ;
    g_rows( g_row_count ).w := p_worksheet ;
    END ;
    PROCEDURE set_column_width( p_column IN NUMBER , p_width IN NUMBER, p_worksheet IN VARCHAR2 ) IS
    BEGIN
    g_column_count := g_column_count + 1 ;
    g_columns( g_column_count ).c := p_column ;
    g_columns( g_column_count ).wd := p_width ;
    g_columns( g_column_count ).w := p_worksheet ;
    END ;
    END ;
    SHOW errors ;
    Thanks,
    Maddy B

    Hi,
    Peter Gjelstrup wrote:
    Next thing is how to use it:
    declare
    k_file constant varchar2(30) := 'YourFile.xls'
    begin
    create_file(k_file);
    -- Call other procedures
    close_file;
    end;
    Don't forget: these procedures are all part of the gen_xl_xml package.
    To call them from outside the package, you have to prefix each procedure name with the package name, like this:
    declare
    k_file constant varchar2(30) := 'YourFile.xls'
    begin
    gen_xl_xml.create_file(k_file);
    -- Call other procedures
    gen_xl_xml.close_file;
    end;

Maybe you are looking for

  • What's new in ColdFusion 10

    This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSd160b5fdf5100e8f639b4550129d6ce3d 4f-8000.html

  • ITS cannot can transform %3D into = and can´t get the Work Item ID

    Hi experts, We have an ECC 6.0 EHP3 with a EP 7 (Netweaver 2004s SP18). We use the UWL. The issue is when we try to open a taks in the UWL that launch a transaction in the ECC, it can´t open, show this error: Transaction SWK1+WI_ID=000000005 is unkno

  • Megaplayer ms-5533 sd card problem

    i have megaplayer 533 ,model ms-5533 all work fine, on computer connect like usb without drivers... i buy sd card 4gb kingston micro sd adapter,micro sd 4gb... i put card in slot press power on button, and on displey see message MEGA and nothing not

  • What's the disadvantages of using webserver and appserver of different type?

    If I choose webserver:iPlanet6.0 and appserver:WebLogic6.1 on one server, What's the disadvantages? Mayby I will use the webserver and appserver of the same company. I wish someone give me some advice.

  • Prompt window Issues-resize and date format setting to 'mm/dd/yyyy' .

    Guys,         I have two issues which needs to be solved for better reporting.         I am using url reporting approach to view reports in ActiveX viewer.         1) I have to set date format to 'mm/dd/yyyy' in parameter prompt window by default It