Forms to Excel (OLE2 and macro)

Hi,
I am using OLE2 to export data from Forms to Excel. Once I export the data into an excel spreadsheet successfully, I would like to format the worksheet. I have created a macro to do that and try to call the macro from Forms.
I am getting Ora-305500 and Excel starts but the worksheet doesn't open.
Is it something to do with the way I created/saved my macro?
Please help!
DECLARE
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
args ole2.list_type;
BEGIN
application:=ole2.create_obj('Excel.Application');
ole2.set_property(application, 'Visible', 'True');
args:=ole2.create_arglist;
ole2.add_arg(args, 'C:\excel.xls');
workbook:= ole2.invoke_obj(workbooks, 'Open',args);
ole2.destroy_arglist(args);
args:=ole2.create_arglist;
ole2.add_arg(args, 'c:\personal.xls!acrt_macro');
ole2.invoke(application, 'Run', args);
ole2.destroy_arglist(args);
--ole2.invoke(application,'Quit');
ole2.release_obj(workbook);
ole2.release_obj(workbooks);
ole2.release_obj(application);
END;

Yes, it is possible to read from & write to an excel file.
you have to use the DDE package to achieve your goal. Read the help content for DDE package, which explains in detail.

Similar Messages

  • Forms 5.0 OLE2 and MAPI interface

    Does anyone know where I can get documentation on the MAPI
    interface commands that are used with the OLE2 forms built in
    package?
    null

    You can't. Upgrade to Forms 6 or 9.

  • How to create form or tabbed template and import excel data

    Hi there
    I am wanting to know how I can create a rather comprehensive template that will be copied a number of times on the same page but each time will include different data from an excel spreadsheet.
    The template will need to include quite a bit of layout and placement of text and images. The fields range from data type including names, phone number, email, prices, description and address.  See attached image below of what I am wanting to acheive.
    I'm just not quite sure how to set this up as a form/template in indesign and what the best and fastest way would be.
    There will be about 6-8 blocks to a page.
    Any ideas would greatly be appreciated.
    Thanks

    You need Data Merge
    OPENS VIDEO
    http://www.theindesigner.com/podcasts/tid43_theindesigner_43.mp4
    http://www.theindesigner.com/blog/episode-43-data-merge-video

  • Copy and Paste from Oracle Forms to Excel

    Hi to All,
    I ran into this unusal problem with one user. She is trying to copy data in a cell from oracle form to excel. She does control+c and tries to control+v in excel. The data does not get pasted.
    I tried logging into oracle on her pc and do the same method. I get the same results.
    We tried copy from the menu bar in oracle and go into excel , menu and do paste. And it does not paste.
    I did a test from copy from word document to excel...that worked.
    We tried a different pc and everything worked.
    Is there a setting in oracle when i do a copy that is not copyin the cell correctly. Any tips how to resolve this problem.
    Thanks in advance for help in this matter.

    If it only happens on one PC, then usually there is a problem with the PC showing the "yellow bars" when logging into Oracle Forms. Otherwise, there is a more global problem with unsigned JAR files on the server.
    Unable To Copy And Paste Text To Desktop Applications From Core Applications
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=434038.1
    Cannot Cut, Copy, or Paste from a Desktop Application into Oracle Applications
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=168280.1
    Cannot Perform a Copy and Paste from release 12.0.4 from or to Excel
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=735670.1

  • Will I be able to create fillable pdf forms from existing word and excel documents?

    Will I be able to create fillable pdf forms from existing word and excel documents?

    Hi
    Yes you can. You may visit this link to check the workflow: https://www.youtube.com/watch?v=O0PPzFq3X00
    Regards,
    Ajlan Huda.

  • I am using LABview 5.0 and I am having difficulty with running EXCEL 2000 and my macros after I build an application.

    Excel opens and runs the macros correctly in my development programme, but when I build an application and try to run it, Excel opens but does not put the data into the cells or run the macros. Excel opens and runs the macros correctly in my development programme, but when I build an application and try to run it, Excel opens but does not put the data into the cells or run the macros.
    The error message is 'Object is not registered in set cell value.vi code-2147220997
    I stress that it all works OK until the application is built. Set cell value.vi was downloaded from this site. I am using Windows 98.
    Any help would be appreciated.

    Be sure you have your Excel activex controls properly registered in your system, there are lots of activex registerers in the web. If this does not work, look at set cell value vi and check for invalid refnums. If even this fails, i'd try reinstalling app builder, but be sure you install it before any LV update (for example 5.0.1f1) unless you want problems like i had with Excel built examples. You can also send an example, and see if i can fix it, but i don't have excel 2000 (only 97) so i don't know if i can do anything else.
    Hope this helps

  • Making and running excel or word macros

    i would like to make a excel or word macro and run it in labview, but
    i don´t want to run without view the code directly in labview because
    i will need to modify the code in order to do differents things
    depending of the choose that i can make when the program it´s running
    so the answer is: how can i see the macro code in labview in and excel
    or word application and how to run it?
    don´t answer the solution it´s easymacro.com, couse i am a student and
    i need to see the diagram in order to learn
    thanks!

    I think ActiveX is what you need, but you'll have to elaborate a bit to modify and run macros. Look at the examples shipped with LabVIEW about controlling Excel, and see how those work. After that, you'll see that almost anything can be done using ActiveX.
    Good luck

  • Help! We have a form with more than 200 entries and when I looked at it yesterday it had one! When you download the form to excel they all show up. However, when I added another record today it disappeared. Can you tell me what's happening? I've been usin

    Help! We have a form with more than 200 entries and when I looked at it yesterday it had one! When you download the form to excel they all show up. However, when I added another record today it disappeared. Can you tell me what's happening? I've been using adobe forms for 2 years with mass response feedback and have never had this problem.

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • Can I simultaneously save a form as a PDF and export to Excel?

    Can I simultaneously save a form as a PDF and export to Excel?

    Regardless of your goal yes, it would be separate steps - but let me see if I understand what you want so I can explain better...
    I am assuming you want to export the response data to Excel, this is an action from the "File" = "Export Responses" menu item and can export all of the response data to Excel at one time (also has the option of PDF or CSV).  That would be done as one step, exporting to Excel.  If you also wanted a PDF version of the table with all responses you could repeat that and select "PDF" the second time.
    If you want PDF's of each individual response (you can "Download Response as PDF" which is a PDF that looks like the original form filled out) then that is also a separate step and has to be done individually for each response you want to download as PDF.
    Thanks,
    Josh

  • When  Adobe Formscentral retires can we still send the forms to our customers  and recieve data on the response to export to excel

    When  Adobe Formscentral retires can we still send the forms to our customers  and receive data on the response to export to excel?

    Hello,
    Unfortunately, after the retirement of Adobe FormsCentral; you will not able to send and receive responses.
    Please visit the following link for more information:- End of support | Adobe FormsCentral
    Regards,
    Nakul

  • Excel spreadsheets with macro's

    Good day
    Excel spreadsheets with macro's created in Windows does not work on my Macbook (excel for mac 2011), even if I enable macro's. I do not create these spreadsheets myself. Cn anyone assist please? Thank you for your time.

    Hi,
    As far as I known, the macro/Active X control can be used well with both of the Office 2013 and Office 365.
    Would you like to share us a sample file that created in Office 2013? I'd like to test it. You can send it via Email ([email protected]).
    If you have any update, please feel free let us know.
    ===========
    Update:
    I have received your mail and
    attachment. Then, I tested it, I found the probably reason.
    You were using ActiveX controls in the sample file, and them displayed 4 tabs in Format control dialog box. Next, you created a new Form control, it displayed 7 tabs.
    You were using the two type of controls. ActiveX controls and Form controls
    are different.
    Form controls
    Form controls are the original controls that are compatible with earlier versions of Excel, starting with Excel version 5.0. Form controls are also designed for use on XLM macro sheets.
    ActiveX controls
    ActiveX controls can be used on worksheet forms, with or without the use of VBA code, and on VBA UserForms. In general, use ActiveX controls when you need more flexible design requirements than those provided by Form controls. ActiveX controls have extensive
    properties that you can use to customize their appearance, behavior, fonts, and other characteristics.
    For more detail information, please refer to the following link:
    https://support.office.microsoft.com/en-us/article/Overview-of-forms-form-controls-and-ActiveX-controls-on-a-worksheet-d101804a-0f84-43ad-8cb2-e19277b8e3fb?CorrelationId=0e7129b7-8ea2-458c-af14-a99292d300b9&ui=en-US&rs=en-US&ad=US
    Hope it's helpful.
    Regards,
    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.

  • Automate PDF Form to Excel

    I have Adobe Acrobat X Pro and Adobe LiveCycle Designer ES2. I'm going to start off with what I have currently and what I want to do to see if anyone can come up with a solution.
    I have created a form for new suppliers to fill out in Adobe Acrobat X Pro. The form works very well, I was able to use some Javascript for two checkboxes to fill in data if the ordering address is the same as shipping address. I typically get 3-4 of these a day. Once I receive a form I either manually have to enter this data into our vendor data or use an excel file that will complete some of the work. Until I created this form, they were typically hand written and the end user (me) manually transcribes all of the data into the excel file or into our vendor data software.
    What I want is for the PDF form to get filled out by the supplier. When I receive the form returned, I want to run a macro in VBA and import the data from the form into Excel. If anyone has some advice on how to accomplish this task that would be great. Some other questions/notes below:
    Using distribute forms does any of the data get uploaded to Adobe? This is confidential information I am dealing with I can't have any outside user see it. I have not been using distribute form, I have just saved an extended version that I send to the supplier.
    I have a signature field that locks the pdf when it is signed. I'm not sure if this will cause a problem.
    One of the main issues I am facing is I can't make this a complex process. I want to automate this task, but if I make the task too complex I will not be allowed to use it.
    I mentioned I have Adobe LiveCycle Designer ES2 on my computer. I have messed around in the software but I am mostly unfamiliar with it.
    Thank you!

    Hi George,
    The format I'm looking for is something that can be imported easily into Access; I was shooting for CSV or XLS, but now I'm wondering if XML would be easier.
    I have experience with Visual Basic.NET, VB6, VBA, some ColdFusion, HTML, ASP.NET, and non-programming languages such as SQL, SAS and R.
    For JavaScript, I remember reading something a while back that you can do everything in Notepad - is that correct?  The IT department here is horribly strict (I had to have my director sign off on software that was already approved), so having to get something installed will take months.
    Thanks again!!
    Chris

  • Export data from forms to excel

    HI
    In my application im trying to export data from forms to excel.Everything works fine.First of all im using get_file_name for selecttion of file and passing it to ole2 package as follows
    FILENAME := GET_FILE_NAME(File_Filter=> 'XLS Files (*.xls)|*.xls|',dialog_type=>SAVE_FILE);
         ARGS:=OLE2.CREATE_ARGLIST;
         oLE2.ADD_ARG(ARGS,Filename);
         OLE2.INVOKE(WORKSHEET,'SAVEAS',ARGS);
    The problem is if i select an existing file the get_file_name itself raises one message ".....file already exists Replace an existing file?"
    Similarly the excel also also raises the same message "".....file already exists Replace an existing file?".I want to suppress atleast one of them? Could anyone help for this problem?
    appreciate ur help
    THANKS

    Looks like...
    ole2.set_property( ex_app, 'DisplayAlerts', false );
    where "ex_app" variable Excel Application -
         ex_app:=     ole2.create_obj('Excel.Application');
    and more Question:
    When i close excel app - in process viewer i see "excel.exe"
    ole2.release_obj don't work :(

  • Excel 2007 and Smartview 11.1 file open slow

    We are in the process of upgrading to HFM system 11.1 and smartview 11.1.1.3 and as part of this process we are starting to use Excel 2007. I am encountering an interesting problem when opening files in Excel 2007 using smartview 11.1 and I am wondering if any one else has seen this problem and found a solution.
    First I converted an excel 2003 file to excel 2007 and saved the file as an xlsx file type. Then I am able to open the file and it would take about 30 seconds to open the file. The file has about 15,000 formulas on for spreadsheets. If I click on each spreadsheet individually and use the "Refersh" button I can save the file in about 10 seconds and then close the file. When I open the file again it will open in 30 seconds. Now using the same file I click "Refresh All" and the file processes fine. I am able to save and close the file in about 10 seconds. However, when I try to open the file again it takes about 20 minutes to open, and then 20 minutes to close.
    This only happens with two or three files. I have another file that is 40 spreadsheets and about 3,000 formulas that is not affected when I click Refresh or Refresh All.
    Any help would be apperciated.
    Rich

    Hi
    On metalink i found some notes about this issure
    "Background
    SmartView communicates over HTTP using .NET. This just means that requests and responses are sent in a standard XML format that is tucked in the HTTP headers. The mechanism is the same as when your internet browser requests a file or submits a form (simplification). A standard Microsoft component that is part of Internet Explorer is used for this.
    There are three components (four if you include the network) in a SmartView refresh:
    -the client
    -the web server
    -the HFM application server
    It is easiest to troubleshoot when they are on separate machines. (Running SmartView on the server to see whether it works better is a useful test to see what effect the network is having, but doesn't show any other bottlenecks.) If you run Task Manager on these 3 machines showing the Performance tab, you will see initial activity on the client as Excel clears the cells and the request is converted into XML. Then you see the web server get busy as it receives and parses the request. Then the application server is busy as it send the data, then the web server is busy as it compiles the results into XML again, and finally the client parses the XML, pushes the data into cells and runs an Excel calculation. This last stage is the longest of all. Overall, it is typical to see the client doing 90-95% of the work, so client performance is a very important factor. Look out for Excel's memory usage increasing and RAM becoming in short supply. Often, user dissatisfaction with refresh times can be alleviated by giving them more RAM or a faster PC.
    The situation we are dealing with here, however, is when the chain of events described above is interrupted. In this case, you will see the client or the web server wait in vain for a response from the next machine in the chain. The case of invalid XML is similar, but the response is truncated so that the XML is not well-formed when it arrives. XML consists of matching pairs of tags and is not well-formed when a closing tag is missing. This can be caused by certain network settings such as packet size (see later). The end result in either case is the same: as Excel cleared the cells before sending the request, cells are left blank or with zeroes.
    Your job now is to work out why the particular component is failing.
    Client
    Check the HTTP time out in the registry:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]\
    "ReceiveTimeout"=dword:00dbba00
    "KeepAliveTimeout"=dword:002BF20
    "ServerInfoTimeout"=dword:002BF20
    The time-out limit is five minutes for versions 4.0 and 4.01 and is 60 minutes for versions 5.x and 6. Also, the time-out limit is 30 seconds for Windows Internet Explorer 7. To change the settings, add the above keys. The above values are hexadecimal, not decimal and correspond to 18000 milliseconds (3 minutes) and 240 minutes for the receive time-out. See
    - http://support.microsoft.com/kb/813827
    - http://support.microsoft.com/kb/181050
    Once you make those changes, my recommendation is that you reboot the client machine.
    Web server
    Look for errors in logs showing that the web app didn't respond/disconnected or timed out waiting for another application (i.e. the HFM application server). Eliminate load balancers etc. during testing in order to isolate the problem and to ensure that the user always goes to the same web server otherwise, logs can be hard to interpret. See also the IIS Tuning Guide for IIS settings. We cannot recommend particular settings, as each client must establish the optimal settings for their own environment after performance testing. If necessary, engage the services of a suitably qualified consultant.
    Application Server
    HFM application server performance is very dependent on whether the data is already in RAM or not. One symptom, where the first refresh fails but the second one succeeds, is probably a sign that the cache needed to be populated and once that had been done (by the first refresh) it went faster. HFM loads whole subcubes (Scenario, Year, Value and Entity) into cache, so asking for lots of accounts in the same subcube is fast, but asking for lots of entities will inevitably slow things down as it runs out of RAM and starts unloading subcubes to make room for more. The HFM event log (HsvEventLog.log) shows this happening, but don't forget that the messages you see are a normal consequence of the way HFM works and are not a problem unless you see a hugely elevated number of them during the period the refresh occurs. Another sign would be page file thrashing.
    If there are several servers in a cluster, use sticky sessions in HFM to make sure tests always go the same server, or hit one server directly rather than using the cluster.
    Solutions here involve giving more RAM to the server (probably not possible because of the 2 GB limit) and changing the worksheet design to restrict the number of subcubes accessed. A separate consolidation server, so that reads are not competing with intensive consolidations and calculations, would be a good thing.
    Network
    To find out if packets get fragmented, use
    ping -l size -f
    to send a big packet with the 'don't fragment' flag. E.g.
    Ping -l 1024 -f oracle.com
    If you see a reply like Reply from 141.146.8.66: bytes=1024 time=200ms TTL=245 then the size you specified is below the packet limit of the network. But if you use, for example, 2000 in place of 1024, you get Packet needs to be fragmented but DF set, then you know you have exceeded the limit. Combine this investigation with a Fiddler trace (https://www.fiddler2.com/fiddler2/) to see what size data messages are being sent and received.
    Troubleshooting Guidance
    If you seriously want to go into this in more detail, then it will take a considerable effort on your and your IT Department's part. My general advice would be:
    1. During this process, fix your environment so that it is predictable. Register a single HFM application server and connect to that. Use a single web server and don't go through Apache or any other redirector. Make sure we know which machine to go to for logs. This would be a temporary measure and it doesn't stop the other users using the full, load balanced system so long as it doesn't involve your server.
    2. As far as possible keep other users from using it during testing, unless you are specifically testing for performance under load. We want to see what activity is due to SmartView and not random other jobs.
    3. Use PerfMon on all three machines: client, web server and application server.
    4. Clear Logs before testing and note the times of each test so the logs can be correlated.
    5. Log CPU activity, memory usage, network throughput, page faults, thread count etc. I'm no expert on this so get advice from someone who is.
    6. In addition to the performance logs, from the IIS Server get:
    * HTTP.SYS Error Log - %windir%\System32\LogFiles\HTTPERR (Default location; configurable)
    * IIS Website Log - %windir%\System32\LogFiles\W3SVC# (Default location; configurable)
    * Event Log (both System and Application) in EVT and TXT (tab separated) formats
    7. From HFM Application server get:
    * HsvEventLog.log (in <HFM install>\Server working Folder)
    * Event Log (both System and Application) in EVT and TXT (tab separated) formats
    8. Be aware of all timeout settings in your environment (i.e. IIS & the network) and time your tests. This can show whether it is an ASP timeout, script timeout, client side timeout or whatever. Note that the Web Session Timeout setting for SmartView in HFM's Server and Web Configuration is a separate issue from IIS timeouts. Web Session Timeout controls the length of idle time before SmartView makes the user log in again. Default 20 mins.
    9. Run Fiddler traces to directly observe the XML and check for HTTP failures.
    Further resources
    - Tuning IIS 6.0 for HFM
    - SmartView Performance FAQ
    Both are available from Support.
    Author: Andrew Rowland
    Version: 11.x (Fri, 30 October 2009)"
    regards
    Alexander

  • Difference between bex user exit and macros in functionality?

    Hi all,
    I need to create a report on material master data. I created an infoset on 0material and 0mat_plant. In the requirem
    ent, I have a report containing different material numbers followed by attributes in each row. the final column in each
    row should be calculated using logic. the logic involves comparing different row values and arrive at final conclusion.
    the logic comprises of large number of if conditions. so should i use bex user exit or excel macros?
    what is the difference between user exit and macros in funcitonalilty?
    is there an issue transporting the macro to Prod for end users to use?
    any performance criteria?
    Any how to documents ..will be of a lot of help
    plz send them to [email protected]
    Message was edited by:
            ravi a

    Hi,
    Macros offer a powerful and flexible way to extend the features of MS Excel. You can either create a macro using VB code or Record a macro. Use Alt+F11 for creating macro using VB code.
    You can refer to Microsoft help site or this link for more details:
    http://www.taltech.com/support/sw_tricks/exmacros.htm
    User-exits are empty subroutines that SAP Developers have provided for you.You can fill them with your own source code.Technically this is a modification.Customer exits are nothing but a include in customer name space will be provided in the function module which starts with CALL CUSTOMER.You can fill them with your own source code.Technically this is an enhancement.
    look into following links for procedure to find and use user-exits transaction for finding user-exits is 'SMOD'
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/user_exits_tutorial.html
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

Maybe you are looking for