Excel files in building block 102
Hello Experts,
Could you please tell me where can i find the below files mentioned in best practices BB # 102.
102_EWT_Config_EN_IN.xls referred in BB 102.
102_tax_code.xls referred in BB 102.
Thanks and Regards,
Diwakar.
Thanks to Francois and Twolf
for the valuble suggestions. At this point in time, I can not go thru the JSP route, so webUtil seems more appealing. I am fairly new to forms and any help is deeply appreciated.
Since I have never used WebUtil before, could you or anyone else direct me to a simple/basic example of how I can use it? Also does it get bundled with forms 10g dev suite? I also read something abt Jacobs library. Where can I download it? Is this supported by Oracle?
Please help me with the example of downloading blob content with the webUtil (corresonding to the mime_type) . Once I store the file (blob content) in its native format, do I need to use web.show_document to display the same in a pop up window?
Similar Messages
-
Build Array and Output Values to Text or Excel File
I know this is a simple question but I need some help. I'm reading a DC voltage in LabVIEW a while loop. I want to store all the read values into an array and export that array as an text or Excel file. I had a VI that I build before for this but I cannot seem to find it and I can't remember how I did it before. Any help is appreciated. I think I can do the exporting part but I do help with building the array (storing all the data values).
I run into a problem while using the "Write to Text File Function". Initially I took about 60 measurements and wrote to a text file. That works but I increased the amount of measurements to be taken to 600 and when I did that the output in the text file are all Chinese letters (or that's what it seems like). Is this because I'm writing too much data?
When I use the "Write To Spreadsheet File VI" to write the measurments it works fine for the 600 measurements. The problem with this is I cannot insert any text. Using the "Write to Text File Function" I inserted some text before the measurements and "end of lines", to format the data. Attached is a screenshot of my VI.
Attachments:
measurements.PNG 45 KB -
Unable to open excel file through application created by application builder
Hello,
I've created an application for my program using application builder, but the built application is not able to open the required excel file as it was being opened in original program.
Please help.Please post your code. We cannot do anything to help you if you do not. There are too many things that could be wrong for us to try and guess what you are doing. Also please tell us which version of LV you are using and which version of the toolkit. This is important because there have been a lot of changes to the toolkits here in the last couple of years.
Joe.
"NOTHING IS EVER EASY" -
Unable to Connect to the Data Source with Report Builder when using a closed Excel file
I am using Report Builder 3.0 and to get started I am using an Excel spreadsheet as my data source. I set this up just fine. I can connect successfully if the file is open Excel. But if I close the file, I get the error "Unable to
Connect to the data source".
This is my connection string:
Dsn=Licenses;dbq=C:\USERS\AMEADE\DOCUMENTS\licenses.xlsx;defaultdir=C:\USERS\AMEADE\DOCUMENTS;driverid=790;fil=excel 8.0;maxbuffersize=2048;pagetimeout=5
Works fine if the file is open but stops working when the file is closed. Any idea what I can do?Hi Alice,
Based on my understanding, when you keep the Excel file open, you can connect to the data source correctly. But when you close the Excel file, the error “Unable to Connect to the data source” is thrown out.
In your scenario, I would like to know if only this Excel comes across this issue. Have you experienced the same issue when you use other Excel files as a data source? As we tested in our environment, we can connect to the data source whether the Excel file
is open. You can refer to this
article to create a data source again then check if you can connect to the data source when the Excel file is closed.
If issue persists, I would suggest you use the
Process Monitor to capture the processes during the connection to the data source. Then check the result of each process to find the exact reason.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Portal Building Blocks - missing EPA files
Looking to obtain the EPA Files for SAP best Practices Building Blocks - particularly looking for BP_R3_ALL.EPA
which is listed at:
http://help.sap.com/bp_epv260/EP_EN/html/epa_files.htm
But all links to files on this page do not work? Anyone have an alternative location I can get the required files for the building blocks???Looking to obtain the EPA Files for SAP best Practices Building Blocks - particularly looking for BP_R3_ALL.EPA
which is listed at:
http://help.sap.com/bp_epv260/EP_EN/html/epa_files.htm
But all links to files on this page do not work? Anyone have an alternative location I can get the required files for the building blocks??? -
Hi there,
i have Q i have excel file it need to be block with password. Could you please explain how i make password protect to Excel document
ThanksOn the File menu, click Save As.
On the Tools menu, click General Options.
Do either or both of the following:
If you want users to enter a password before they can view the workbook, type a password in the Password to open box, and then click OK.
If you want users to enter a password before they can save changes to the workbook, type a password in the Password to modify box.
NOTE Unlike passwords you specify in the Password to open box, passwords you specify in the Password to modify box are not encrypted. These passwords are only meant to give specific users permission to modify workbook data. For optimal password security, it's best to assign both passwords. An encrypted password to access the workbook, and one to provide specific users with permission to modify its content. IMPORTANT Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. Strong password: Y6dh!et5. Weak password: House27. Use a strong password that you can remember so that you don't have to write it down.
If you want to use a different encryption type, click Advanced, click the type you want in the Choose an encryption type list, and then click OK.
If needed, specify the number of characters you want in the Choose a key length box.
NOTE Document property encryption is enabled by default for most encryption types and providers. It prevents unauthorized users from viewing summary and custom file properties (such as the author or any custom file information) in theProperties dialog box. When users right-click the password-protected file, and then click Properties, information won't be available on the Summary tab and Customtab. Authorized users, however, can open the file and view all file properties (Filemenu, Properties command). To disable document property encryption, clear theEncrypt document properties check box.
Click OK.
When prompted, retype your passwords to confirm them.
Click Save.
If prompted, click Yes to replace the existing workbook.
NOTE You can also secure a workbook with a password on the Security tab of the Options dialog box (Tools menu, Options command). -
I have three separate 1 dimensional arrays in a while loop. I need to combine these arrays and save as a excel file outside the loop.
My second question is that is there any emergency STOP button in Labview so that when I press that button, it cuts all the power going to the system. Thanks...Just a comment on the Stop button.
It's not really a good idea to rely solely on a software emergency shutdown. Especially if the shutdown is to prevent some type of hazardous condition to the people running the test. The problem is that if your application or PC in general is having some type of problem, it may not be able to shut everything down as needed.
You should always have a mechanical �Big Red Stop Button� that you can hit to cut power to everything. In addition to the button, I usually do have LabVIEW monitor things and if conditions are not looking good, have it automatically shut things down. This has always worked good, and I can�t remember any time I�ve actually had to use the big button, but it�s nice to know it�s there.
VERY IMPORT
ANT:
Using the �Abort� button on the LabVIEW toolbar is NOT the thing to do. This stops your application where ever it is in its execution and does not allow it to finish or execute any shutdown code you might have put in. A �Kill� button on the front panel works well. I�ve put a single Boolean terminal in its own little While loop to monitor it. It usually writes to a digital line that�s holding a relay on that will cut the power.
Ed
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences. -
Can I use then Forms 6i DDE build-in package to generate 2010 EXCEL File?
Hi All,
My company' application is used Oracle FORMS 6i Solution,Client /Server environment to generated EXCEL file
I coding the PL/SQL in the Oracle FORM , it's succeed generated EXCEL file in MS office Excel 2007/2003/2000.
Now I have problem in MS office Excel 2010 , It's just open the Excel file but no data can write into excel file,
It's always raise the error exception "dde.dmlerr_no_conv_established"
some one can help me,thanks !!
my pl/sql code wrote in Button Item's trigger WHEN-BUTTON-PRESSED
declare
obj ole2.obj_type;
path varchar2(256);
p_excel_path varchar2(255);
appid pls_integer;
convid pls_integer;
begin
begin
obj := ole2.create_obj('excel.application');
path := ole2.get_char_property(obj,'path');
ole2.release_obj(obj);
ole2.invoke(obj,'quit');
exception
when others then
message('office excel not found!');
return;
end;
p_excel_path := path||'\excel.exe';
synchronize;
appid := dde.app_begin(p_excel_path, dde.app_mode_normal);
dde.app_focus(appid);
convid := dde.initiate('excel','book1');
dde.poke(convid,'r1c1','abc',dde.cf_text,100000);
dde.poke(convid,'r2c2','abc',dde.cf_text,100000);
exception
when dde.dmlerr_no_conv_established then
message('dmlerr_no_conv_established');
raise form_trigger_failure;
when others then
null;
end;
帖子经 Ronald Wang编辑过Hi all,
I can understand what you say, and I know the Forms version is very old ,but I don't know how to explained to my boss,
My boos always say : Delphi can export data to Excel until now!...
I always say : I will upgrade my Forms version......
Because my company use Oracle EBS r12 ,the technical based on Oracle FORM/Report 10g
I tried to install the OAS 10g ,but the 10g server is unstable....
Then I thinking to upgrade the Form 6i to Form 11g.....,what are you think it's feasibility??
My OS version is windows XP.....
BTW...some Oracle Rport 6i can't not preview in Windows 7 's platform,but not all........Orz
In XP platform ,all Report preview is well...
Edited by: Ronald Wang on 2011/5/26 下午 6:23 -
Q: XML Publisher build template on Word then Output to Excel file
Hi All
When create template on MS-Word then output to Excel file
When Data Format include percentage then output to Excel The Excel just only show two decimal
Ex: 9.6549% Excel show ->9.65%
* Except 9.6549% on Excel *
Thanks
JohnsonHi
What version of XML/BI Publisher you have?
Thanks
Ravi -
How to upload excel file in application server??
Hi,
How to upload an excel file into internal table in background mode from application server?
ThanksHi vipin,
check this it may help you...
hope below links helps you
Export the report list to Excel Sheet
http://www.sapdevelopment.co.uk/file/file_updown.htm
or below is a sample programme which helps you upload and download
REPORT ytest5 LINE-SIZE 80
LINE-COUNT 65
NO STANDARD PAGE HEADING.
TABLES: dd02l, dd03l.
* selection screen
SELECTION-SCREEN BEGIN OF BLOCK b00 WITH FRAME TITLE text-b00.
SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
PARAMETERS: tabname LIKE dd02l-tabname OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b01.
SELECTION-SCREEN BEGIN OF BLOCK b03 WITH FRAME TITLE text-b03.
PARAMETERS: path(30) TYPE c DEFAULT 'C:SAPWorkdir'.
SELECTION-SCREEN END OF BLOCK b03.
SELECTION-SCREEN BEGIN OF BLOCK b04 WITH FRAME TITLE text-b04.
PARAMETERS: p_exp RADIOBUTTON GROUP radi,
p_imp RADIOBUTTON GROUP radi,
p_clear AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b04.
SELECTION-SCREEN END OF BLOCK b00.
* data
DATA: q_return LIKE syst-subrc,
err_flag(1) TYPE c,
answer(1) TYPE c,
w_text1(62) TYPE c,
w_text2(40) TYPE c,
winfile(128) TYPE c,
w_system(40) TYPE c,
winsys(7) TYPE c,
zname(8) TYPE c,
w_line(80) TYPE c.
* internal tables
DATA : BEGIN OF textpool_tab OCCURS 0.
INCLUDE STRUCTURE textpool.
DATA : END OF textpool_tab.
* table for subroutine pool
DATA : itab(80) OCCURS 0.
* events
INITIALIZATION.
PERFORM check_system.
AT SELECTION-SCREEN ON tabname.
PERFORM check_table_exists.
START-OF-SELECTION.
PERFORM init_report_texts.
PERFORM request_confirmation.
END-OF-SELECTION.
IF answer = 'J'.
PERFORM execute_program_function.
ENDIF.
TOP-OF-PAGE.
PERFORM process_top_of_page.
* forms
* FORM CHECK_TABLE_EXISTS *
FORM check_table_exists.
SELECT SINGLE * FROM dd02l
INTO CORRESPONDING FIELDS OF dd02l
WHERE tabname = tabname.
CHECK syst-subrc NE 0.
MESSAGE e402(mo) WITH tabname.
ENDFORM.
* FORM INIT_REPORT_TEXTS *
FORM init_report_texts.
READ TEXTPOOL syst-repid
INTO textpool_tab LANGUAGE syst-langu.
LOOP AT textpool_tab
WHERE id EQ 'R' OR id EQ 'T'.
REPLACE '&1............................'
WITH tabname INTO textpool_tab-entry.
MODIFY textpool_tab.
ENDLOOP.
ENDFORM.
* FORM REQUEST_CONFIRMATION *
FORM request_confirmation.
* import selected, confirm action
IF p_imp = 'X'.
* build message text for popup
CONCATENATE 'Data for table'
tabname
'will be imported' INTO w_text1 SEPARATED BY space.
* check if delete existing selected, and change message text
IF p_clear = ' '.
w_text2 = 'and appended to the end of existing data'.
ELSE.
w_text2 = 'Existing Data will be deleted'.
ENDIF.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'N'
textline1 = w_text1
textline2 = w_text2
titel = 'Confirm Import of Data'
cancel_display = ' '
IMPORTING
answer = answer
EXCEPTIONS
OTHERS = 1.
ELSE.
* export selected, set answer to yes so export can continue
answer = 'J'.
ENDIF.
ENDFORM.
* FORM EXECUTE_PROGRAM_FUNCTION *
FORM execute_program_function.
PERFORM build_file_name.
CLEAR: q_return,err_flag.
IF p_imp = 'X'.
PERFORM check_file_exists.
CHECK err_flag = ' '.
PERFORM func_import.
ELSE.
PERFORM func_export.
ENDIF.
ENDFORM.
* FORM BUILD_FILE_NAME *
FORM build_file_name.
MOVE path TO winfile.
WRITE '' TO winfile+30.
WRITE tabname TO winfile+31.
WRITE '.TAB' TO winfile+61(4).
CONDENSE winfile NO-GAPS.
ENDFORM.
* FORM CHECK_FILE_EXISTS *
FORM check_file_exists.
CALL FUNCTION 'WS_QUERY'
EXPORTING
filename = winfile
query = 'FE'
IMPORTING
return = q_return
EXCEPTIONS
OTHERS = 1.
IF syst-subrc NE 0 OR q_return NE 1.
err_flag = 'X'.
ENDIF.
ENDFORM.
* FORM func_export *
FORM func_export.
CLEAR itab. REFRESH itab.
APPEND 'PROGRAM SUBPOOL.' TO itab.
APPEND 'FORM DOWNLOAD.' TO itab.
APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
CONCATENATE 'INCLUDE STRUCTURE'
tabname
'.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'DATA: END OF IT_TAB.' TO itab.
CONCATENATE 'SELECT * FROM'
tabname
'INTO TABLE IT_TAB.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'CALL FUNCTION ''WS_DOWNLOAD''' TO itab.
APPEND 'EXPORTING' TO itab.
CONCATENATE 'filename = ' ''''
winfile '''' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'filetype = ''DAT''' TO itab.
APPEND 'TABLES' TO itab.
APPEND 'DATA_TAB = IT_TAB.' TO itab.
APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
APPEND 'WRITE: /1 syst-vline,' TO itab.
APPEND '''EXPORT'',' TO itab.
APPEND '15 ''data line(s) have been exported'',' TO itab.
APPEND '68 syst-index,' TO itab.
APPEND '80 syst-vline.' TO itab.
APPEND 'ULINE.' TO itab.
APPEND 'ENDFORM.' TO itab.
GENERATE SUBROUTINE POOL itab NAME zname.
PERFORM download IN PROGRAM (zname).
ENDFORM.
* FORM func_import *
FORM func_import.
CLEAR itab. REFRESH itab.
APPEND 'PROGRAM SUBPOOL.' TO itab.
APPEND 'FORM UPLOAD.' TO itab.
APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
CONCATENATE 'INCLUDE STRUCTURE'
tabname
'.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'DATA: END OF IT_TAB.' TO itab.
APPEND 'DATA: BEGIN OF IT_TAB2 OCCURS 0.' TO itab.
CONCATENATE 'INCLUDE STRUCTURE'
tabname
'.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'DATA: END OF IT_TAB2.' TO itab.
APPEND 'CALL FUNCTION ''WS_UPLOAD''' TO itab.
APPEND 'EXPORTING' TO itab.
CONCATENATE 'filename = ' ''''
winfile '''' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'filetype = ''DAT''' TO itab.
APPEND 'TABLES' TO itab.
APPEND 'DATA_TAB = IT_TAB.' TO itab.
IF p_clear = 'X'.
CONCATENATE 'SELECT * FROM'
tabname
'INTO TABLE IT_TAB2.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'LOOP AT IT_TAB2.' TO itab.
CONCATENATE 'DELETE'
tabname
'FROM IT_TAB2.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'ENDLOOP.' TO itab.
APPEND 'COMMIT WORK.' TO itab.
ENDIF.
APPEND 'LOOP AT IT_TAB.' TO itab.
CONCATENATE 'MODIFY'
tabname
'FROM IT_TAB.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'ENDLOOP.' TO itab.
APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
APPEND 'WRITE: /1 syst-vline,' TO itab.
APPEND '''IMPORT'',' TO itab.
APPEND '15 ''data line(s) have been imported'',' TO itab.
APPEND '68 syst-index,' TO itab.
APPEND '80 syst-vline.' TO itab.
APPEND 'ULINE.' TO itab.
APPEND 'ENDFORM.' TO itab.
GENERATE SUBROUTINE POOL itab NAME zname.
PERFORM upload IN PROGRAM (zname).
ENDFORM.
* Form CHECK_SYSTEM
* Check users workstation is running
* WINDOWS 95, or WINDOWS NT.
* OS/2 uses 8.3 file names which are no good for
* this application as filenames created are 30 char
* same as table name.
* You could change the logic to only use the first 8 chars
* of the table name for the filename, but you could possibly
* get problems if users had exported already with a table
* with the same first 8 chars.
* As an alternate method you could request the user to input
* the full path including filename and remove the logic to
* build the path using the table name.
FORM check_system.
CALL FUNCTION 'WS_QUERY'
EXPORTING
query = 'WS'
IMPORTING
return = winsys.
IF winsys NE 'WN32_95'.
WRITE: 'Windows NT or Windows 95/98 is required'.
EXIT.
ENDIF.
ENDFORM. " CHECK_SYSTEM
* FORM PROCESS_TOP_OF_PAGE *
FORM process_top_of_page.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
ULINE.
CONCATENATE syst-sysid
syst-saprl
syst-host INTO w_system SEPARATED BY space.
WRITE : AT /1(syst-linsz) w_system CENTERED.
WRITE : AT 1 syst-vline, syst-uname.
syst-linsz = syst-linsz - 11.
WRITE : AT syst-linsz syst-repid(008).
syst-linsz = syst-linsz + 11.
WRITE : AT syst-linsz syst-vline.
LOOP AT textpool_tab WHERE id EQ 'R'.
WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
ENDLOOP.
WRITE : AT 1 syst-vline, syst-datum.
syst-linsz = syst-linsz - 11.
WRITE : AT syst-linsz syst-tcode(004).
syst-linsz = syst-linsz + 11.
WRITE : AT syst-linsz syst-vline.
LOOP AT textpool_tab WHERE id EQ 'T'.
WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
ENDLOOP.
WRITE : AT 1 syst-vline, syst-uzeit.
syst-linsz = syst-linsz - 11.
WRITE : AT syst-linsz 'Page', syst-pagno.
syst-linsz = syst-linsz + 11.
WRITE : AT syst-linsz syst-vline.
ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED OFF.
LOOP AT textpool_tab WHERE id EQ 'H'.
WRITE : AT /1(syst-linsz) textpool_tab-entry.
ENDLOOP.
ULINE.
ENDFORM.
if it helps you reward with points.
regards,
venu
regards,
venu. -
"Open method of Workbooks class failed" when opening Excel file via Internet Explorer
(apologies, I posted this first to the general Office 2010 forum, but then realized this was probably a better spot to post)
We have an Excel COM add-in installed on users' PCs. This add-in responds to workbook open events by opening a particular XLA file (also deployed to the PC) to make certain features available. This process works flawlessly when Excel files are
opened locally - but when a user attempts to open an Excel file from an IE link, we get the following error: "Open method of Workbooks class failed". This is happening on the line that is trying to open the XLA file. This only happens
when launching an Excel link from IE - works fine in Chrome or Firefox.
I have found several posts on this topic, but no solutions:
1. This post (https://social.msdn.microsoft.com/forums/office/en-US/73c96005-84af-4648-b103-32b677205be3/open-method-of-workbooks-class-failed)
is the closest to our problem. In this case, the "answer" was that the user may not have access to the 2nd workbook being opened. But in our case, we're opening an XLA that is on the local machine, and I've confirmed that it is not
corrupt and accessible (read & write, just in case!) to Everyone.
2. This (very old) post (http://www.pcreview.co.uk/forums/open-method-workbooks-fails-excel-hosted-ie-t965608.html)
seems similar, but is talking about opening Excel inside of IE. This is not what we're doing - the link is supposed to (and does) open Excel outside of IE. Interestingly, Excel.exe is being launched with the "-embedded" flag, even
though it isn't running in the IE window. When launching Excel by opening the file locally, Excel.exe is run with the "/dde" flag instead. Clearly the "-embedded" mode is what is causing the problem. I could change the
links on the web page to use some JavaScript to open Excel differently... unfortunately, the links are actually generated by SharePoint (the Excel files are in a SP repository), so this is not really an option.
3. This Microsoft KB article (http://support.microsoft.com/kb/268016) talks about problems opening an XLA directly from IE... but this is the case of a link pointing
directly to an XLA file, not opening a regular workbook that in turn opens an XLA, as is my case. In fact, this article specifically points out in the "More Information" section that "End users do not normally open XLAs; instead they open
an XLS that (if needed) loads one or more XLAs during startup." ==> precisely what I'm trying to do that is giving me the error!
I've replicated the situation with a very simple COM add-in (created in VS2010 using VB.Net) and a very simple XLA file (does nothing, just pops up a message in auto_open). For anyone wanting to try it out, here is the exact test case:
1. In Excel, create a simple XLA file containing only the following code, and save it in C:\TEMP\dummy.xla:
Sub Auto_Open()
MsgBox "Auto Open fired"
End Sub
2. In Visual Studio, create a new Excel 2010 Add-In. I created mine via Visual Basic, but I doubt the choice of language matters. Place the following code in ThisAddin.vb:
Public Class ThisAddIn
Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
AddHandler Me.Application.WorkbookOpen, AddressOf Application_WorkbookOpen
End Sub
Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
End Sub
Sub Application_WorkbookOpen(ByVal workbook As Excel.Workbook)
On Error GoTo ErrHandler
If (Not workbook.Name.Contains("dummy.xla")) Then
MsgBox("Workbook open")
Application.Workbooks.Open("C:\temp\dummy.xla")
Application.Workbooks("dummy.xla").RunAutoMacros(Excel.XlRunAutoMacro.xlAutoOpen)
End If
Exit Sub
ErrHandler:
MsgBox(Err.Description)
End Sub
End Class
3. Build & publish this add-in and install it on the same machine as the XLA created in step 1.
4. Create and save an empty Excel workbook (I called mine WayneTest1.xlsx) - save it locally (on your desktop), and put a copy somewhere on your web server (I put mine directly in c:\inetpub).
5. Create an HTML file with a link to that workbook, saving it to the same web server location - here is mine:
<html>
<body>
<a href="WayneTest1.xlsx">Link to Excel file</a>
</body>
</html>
6. Double click the workbook on your desktop (from step 4) - opens fine, I get the "workbook open" message, following by the "Auto Open fired" message.
7. In Internet Explorer, navigate to the HTML file specified in step 5 and click on the link - when prompted, select "Open" - I get the "workbook open" message, following by the error message "Open method of Workbooks class failed".
Here are a few things I've ruled out / tried so far:
- Unchecked all the "Protected View" settings in Excel, made no difference
- Unchecked all the "File block settings" in Excel, made no difference
- Made sure dummy.xla was open for read & write to Everyone
- Made sure the web page was in Trusted sites and set the security level to Low for those sites in IE
- Tried making the local desktop file (step 6) readonly, made no difference (i.e. launching it locally still worked fine)
- Tried using Excel 2013 - made no difference
Any ideas / suggestions?Hello Wayne,
Apologies for the delay.
I went through your post and tried to reproduce the issue. I was able to reproduce it. Based
on its complexity and as it requires more in-depth analysis, your question falls into the paid support category which requires a more in-depth level of support.
Please visit the below link to see the various paid support options that are
available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
Thanks,
Anush -
How do I create an excel file that has the volume output and the time at which it occured?
Hello:
I am using Labview to control a New Era Pump Systems automatic syringe pump and to record diameter measurements from a LaserMike optical comparator. My program is fully functional, the code is attached with all auxilliary files in the NE-50X folder. I mostly understand my program, I used drivers for the NE-50X pump found on the NI website to build my code and added to it as needed.
If anyone has ideas about how to do any of these three things, your help is greatly appreciated. I have the output from the syringe pump going into a line graph while I run the test with the time on the x-axis and volume on the y-axis. How would I be able to create an excel file from this information? I would like the excel file to have the time in one column and the volume at that time in the next column. I though that I had wired it correctly, however I feel that the time seems to be a little off and very exact. Attached is the block diagram of what I have done.
Hello:
If anyone has ideas about how to do any of these three things, your help is greatly appreciated.
Attachments:
RATETEST.vi 202 KBLet me start by answering the specific question, and then I will provide some suggestions on the code.
The function you want is the "Write to Spreadsheet File", which you're already using, albeit in a confusing means (more later). I was not able to find any place in your code where you're actually acquiring time information, so I don't understand your comment about the time not being exact. (I'm assuming you mean "not", even though that word was not in your actual sentence.)
As for the code:
As I mentioned, you're using the "Write to Spreadsheet File" twice, as well as the "Write to Measurement File" Express VI. All three seem to be logging the same information, though one of the "Write to Spreadsheet File" functions is logging some sort of volume and diameter information. Please pick one.
You're looping around the path for one of the "Write to Spreadsheet File" functions, but not for the other two functions. Why are you looping the path in the first place?
You' re continuously accruing data into an array to put onto an XY Graph. Please keep in mind that this means the program will slow down as it progresses as this array gets larger and larger, and LabVIEW needs to shuffle memory around. Depending on how fragmented your memory is, you may find the program will crash since LabVIEW cannot allocate a large enough contiguous block of memory for the array.
Your wiring really needs to be cleaned up. Tip: Right-click on a wire and select "Clean Up Wire".
In the middle of the diagram you have a case structure in which the True part has a single iteration loop that's adding 1 to the iteration and updating some local variable, and in the False part you're doing something else with it. I have no idea what you're trying to do, but surely there must be a better way to do it.
You seem to have two tank indicators on top of each other on the front panel and then flipping the visibility of them based on some value. I would think that it would be easier to simply display both at the same time, no? As a user, I would find it somewhat perturbing to see the tanks appear and disappear. -
Steps to prepare and upload excel files data to r/3?
Hi abap experts,
We have brand new installed ECC system somehow configured but with no master or transaction data loaded .It is new empty system....We also have some legacy data in excel files...We want to start loading some data into the SAP sandbox step by step and to see how they work...test some transactions see if the loaded data are good etc initial tests.
Few questions here are raised:
-Can someone tell me what is the process of loading this data into SAP system?
-Should this excel file must me reworked prepared somehow(fields, columns etc) in order to be ready for upload to SAP??
-Users asked me how to prepared their legacy excel files so they can be ready in SAP format for upload.?Is this an abaper job or it is a functional guy job?
-Or should the excel files be converted to .txt files and then imported to SAP?Does it really make some difference if files are in excel or .txt format?
-Should the Abaper determine the structure of those excel file(to be ready for upload ) and if yes, what are the technical rules here ?
-What tools should be used for this initial data loads? CATT , Lsmw , batch input or something else?
-At which point we should test the data?I guess after the initial load?
-What tools are used in all steps before...
-If someone can provide me with step by step scenario or guide of loading some kind of initial master data - from .xls file alignment to the real upload - this will be great..
You can email me some upload guide or some excel/txt file examples and screenshots documents to excersize....Email: [email protected]
Your help is appreciated it.!
JonDepends on data we upload the data from file to R/3 .
If it is regular updation then we used to get the data from application server files to R/3 since local file updation we can not set up background processing..
If it is master data upload and that to one time upload then we use presenation server files to SAP R/3..
See the simple example to upload the data to on master custom table from XLS File
Program : ZLWMI151_UPLOAD(Data load to ZBATCH_CROSS_REF Table)
Type : Upload program
Author : Seshu Maramreddy
Date : 05/16/2005
Transport : DV3K919574
Transaction: None
Description: This program will get the data from XLS File
and it upload to ZBATCH_CROSS_REF Table
REPORT ZLWMI151_UPLOAD no standard page heading
line-size 100 line-count 60.
*tables : zbatch_cross_ref.
data : begin of t_text occurs 0,
werks(4) type c,
cmatnr(15) type c,
srlno(12) type n,
matnr(7) type n,
charg(10) type n,
end of t_text.
data: begin of t_zbatch occurs 0,
werks like zbatch_cross_ref-werks,
cmatnr like zbatch_cross_ref-cmatnr,
srlno like zbatch_cross_ref-srlno,
matnr like zbatch_cross_ref-matnr,
charg like zbatch_cross_ref-charg,
end of t_zbatch.
data : g_repid like sy-repid,
g_line like sy-index,
g_line1 like sy-index,
$v_start_col type i value '1',
$v_start_row type i value '2',
$v_end_col type i value '256',
$v_end_row type i value '65536',
gd_currentrow type i.
data: itab like alsmex_tabline occurs 0 with header line.
data : t_final like zbatch_cross_ref occurs 0 with header line.
selection-screen : begin of block blk with frame title text.
parameters : p_file like rlgrap-filename obligatory.
selection-screen : end of block blk.
initialization.
g_repid = sy-repid.
at selection-screen on value-request for p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = g_repid
IMPORTING
FILE_NAME = p_file.
start-of-selection.
Uploading the data into Internal Table
perform upload_data.
perform modify_table.
top-of-page.
CALL FUNCTION 'Z_HEADER'
EXPORTING
FLEX_TEXT1 =
FLEX_TEXT2 =
FLEX_TEXT3 =
*& Form upload_data
text
FORM upload_data.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = $v_start_col
I_BEGIN_ROW = $v_start_row
I_END_COL = $v_end_col
I_END_ROW = $v_end_row
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
write:/10 'File '.
ENDIF.
if sy-subrc eq 0.
read table itab index 1.
gd_currentrow = itab-row.
loop at itab.
if itab-row ne gd_currentrow.
append t_text.
clear t_text.
gd_currentrow = itab-row.
endif.
case itab-col.
when '0001'.
t_text-werks = itab-value.
when '0002'.
t_text-cmatnr = itab-value.
when '0003'.
t_text-srlno = itab-value.
when '0004'.
t_text-matnr = itab-value.
when '0005'.
t_text-charg = itab-value.
endcase.
endloop.
endif.
append t_text.
ENDFORM. " upload_data
*& Form modify_table
Modify the table ZBATCH_CROSS_REF
FORM modify_table.
loop at t_text.
t_final-werks = t_text-werks.
t_final-cmatnr = t_text-cmatnr.
t_final-srlno = t_text-srlno.
t_final-matnr = t_text-matnr.
t_final-charg = t_text-charg.
t_final-erdat = sy-datum.
t_final-erzet = sy-uzeit.
t_final-ernam = sy-uname.
t_final-rstat = 'U'.
append t_final.
clear t_final.
endloop.
delete t_final where werks = ''.
describe table t_final lines g_line.
sort t_final by werks cmatnr srlno.
Deleting the Duplicate Records
perform select_data.
describe table t_final lines g_line1.
modify zbatch_cross_ref from table t_final.
if sy-subrc ne 0.
write:/ 'Updation failed'.
else.
Skip 1.
Write:/12 'Updation has been Completed Sucessfully'.
skip 1.
Write:/12 'Records in file ',42 g_line .
write:/12 'Updated records in Table',42 g_line1.
endif.
delete from zbatch_cross_ref where werks = ''.
ENDFORM. " modify_table
*& Form select_data
Deleting the duplicate records
FORM select_data.
select werks
cmatnr
srlno from zbatch_cross_ref
into table t_zbatch for all entries in t_final
where werks = t_final-werks
and cmatnr = t_final-cmatnr
and srlno = t_final-srlno.
sort t_zbatch by werks cmatnr srlno.
loop at t_zbatch.
read table t_final with key werks = t_zbatch-werks
cmatnr = t_zbatch-cmatnr
srlno = t_zbatch-srlno.
if sy-subrc eq 0.
delete table t_final .
endif.
clear: t_zbatch,
t_final.
endloop.
ENDFORM. " select_data
and also you can use .txt file upload using Function module - GUI_UPLOAD
if it is application server then use open datset command.
Thanks
Seshu -
Error reading excel file using POI.
Hi ,
I am having some problem when reading the excel file.
While reading excel file I am getting error-java.io.IOException: Unable to read entire block; 4 bytes read; expected 512 bytes.
part of my code:-
InputStream stream = objFormFile.getInputStream();
POIFSFileSystem fs = new POIFSFileSystem(stream);//getting above error here.
HSSFWorkbook wb = new HSSFWorkbook(fs);
Case 1:
I download the file on the system ,save it ,and then directly upload it to the system ,I get the above error .
Case 2:
It works fine if I download the excel and manually open and save it and then upload it .
I am using JDK1.4.1 and poi-2.5.1-final-20040804.jar.
Can any one please help me out for the above problem?
Edited by: hruday on Jul 31, 2008 3:20 AMInstead of using POIFSFileSystem, try to directly create the HSSFWorkbook
InputStream stream = objFormFile.getInputStream();
//POIFSFileSystem fs = new POIFSFileSystem( stream );//getting above error here.
HSSFWorkbook wb = new HSSFWorkbook( stream ); -
Fetch excel file from app. server using open dataset...
Hello Experts,
Our functional consultant is asking me if it possible to get an excel file from the
application server file using OPEN dataset and in background mode? If yes, Please tell me on how to do this.
Thank you guys and take care!Hi Viraylab,
to download this the procedure:
you can use the FM 'EXCEL_OLE_STANDARD_DAT ' for this purpose.
this FM 'EXCEL_OLE_STANDARD_DAT' can be used to start Excel with a new sheet and transfer data from an internal table to the sheet.
Here are some of the parameters:
file_name: Name and path of the Excel worksheet file e.g. ?C:TEMPZTEST?
data_tab: Name of the internal table that should be uploaded to Exvcel
fieldnames: Internal tabel with column headers
How to build the field names table:
data: begin of i_fieldnames occurs 20,
field(60), end of i_fieldnames.
i_fieldnames-field = ?This is column 1?. append i_fieldnames-field.
i_fieldnames-field = ?This is column 2?. append i_fieldnames-field.
to upload follow this:
OPEN DATASET dsn FOR INPUT IN BINARY MODE.
DO.
READ DATASET dsn INTO itab-field.
IF sy-subrc = 0.
APPEND itab.
ELSE.
EXIT.
ENDIF.
ENDDO.
[/code]Rob
or Try this function module.
FILE_READ_AND_CONVERT_SAP_DATA
pass 'XLS' to I_FILEFORMAT..
Dont forgot to Reward me points .....All the very best....
Regards,
Sreenivasa sarma K.
Maybe you are looking for
-
My iphone doesn´t play sound on logitech pure-fi anywhere
Hi, my iphone 4 recently quit playing music over the logitec Pure-Fi Anywhere Speakers. It did before but it doesn´t anymore. My husbands iphone still cooperates so it can´t be the speakers who are broken. My iphone still plays the sound on it´s own
-
Are Pivot and Unpivot supported in SSRS
We're upgrading from SSRS 2005 to 2008 R2. I'm rewriting some of my reports and using Unpivot. In SQL it works fine when I run it against the database. But in SSRS (BIDS 2008) when I paste the working SQL statement into the Query Builder, I get an
-
Dear all, I'm in the midst of figuring how ALE being sent out via message control. While looking at a Sales order's output type setting screen, under Medium column it contains: 1. Print output 2. Fax 3. Telex 4. External send 5. Simpal mail 6. Specia
-
Display focus points in Lightroom
I don't know for all cameras but for my Canons the raw file includes data about the focus points achieved. Digital Photo Professional will display these, which is extremely useful for figuring out why your photo is so fuzzy. Going out to DPP is a p
-
Preferences in Mail Wont Close
Hi all, 10.4.5, with the latest (3/13/06?) security update; mail w/some 3rd party add ons: SpamSeive, Mail ActOn and MailTags. All was well until the latest security update (at least I think thats when this started). Now when I open mail preferences,