Chart to excel file in fpga target
I am a new user of LabVIEW.please help me. I want to export the data to an excel spread sheet from a waveform chart (FPGA Target). suggest me a solution.
Also give me a suggestion for sampling in FPGA target.
Hi,
Which FPGA Target you are using? FlexRIO or CompactRIO?
There is a few ways to transfer data from FPGA to computer, you can refer to the following topic for more detail information:
Transferring Data between the FPGA and the Host (FPGA Module)
http://zone.ni.com/reference/en-XX/help/371599F-01/lvfpgaconcepts/pfi_data_transfer/
Once you choose the method of communications, you need to save your data into an excel spreadsheet.
Do you need to generate a graph automatically in the excel? If yes you might need a report generation toolkit for this.
Else, you can use the "write to spreadsheet.vi" to log your data.
I found a great example in the community, you can refer to the link below:
https://decibel.ni.com/content/docs/DOC-7332
Regards,
KwokHow
Applications Engineer | National Instruments
Singapore (65) 6226 5886 | Malaysia (60) 3 7948 2000 | Thailand (66) 2 298 4800
Philippines (63) 2 659 1722 | Vietnam (84) 8 3911 3150 | Indonesia (62) 21 2924 1911
Similar Messages
-
Write an excel file using File adapter
Hi,
I have a scenario in which i have to write an excel file in the target system.
I tried creating a tab delimited file conversion and just named the file as .xls.
When i saw the output file it did look like a excel but a report that i have written to read a excel file cant read it.
The report says 0 records found. It works for other excel sheets that are created manually.
So will this method noit work for creating excel files?
Is using the jexcel api the only option for this?Have u had a chance to see this excellent blog by shabarish...
chekc this
/people/shabarish.vijayakumar/blog/2009/04/05/excel-files--how-to-handle-them-in-sap-xipi-the-alternatives
http://wiki.sdn.sap.com/wiki/display/XI/CODE-CreateanExcelFileviatheJExcel+API -
How to download SPC chart in excel
Dear QM Experts,
Can you suggest/guide how we can down load the SPC charts into excel file (graphic mode) generated from QGC1/QGC2/QGC3.
Warm Regards
UMAPATHI NETII remember the solution provided long back in threads
Import SPC graph to EXCEL
Also refer
Problem in Export bar charts to Excel -
Creating Target excel files dynamically in ODI
Hi,
I've a urgent requirement in ODI as below.
I've a query regarding of creation target excel files dynamically as I need to load more than 1 excel file through ODI with source system as Oracle DB.
Elaborating my query:
Target excel file say X.xls is not placed in a particular directory neither driver is created. I want to X.xls file to be created through ODI and data to be loaded into the excel file.
Help would be really appreciated.There is no standard code for the same.
The following thread has the code which will put data into multiple sheets
Download to multiple sheets in Excel
Regards,
Ravi
Note : Please mark all the helpful answers -
I have written into excel file, now how to draw chart
My following code writes as excel file and displays it on browser. Now I want to draw a chart/graph over it. In standalone mode, I can set up macro in Excel to print charts. Now through servlet how do I bring up chart I want. I am giving my code below, please help on this
protected void doGet(HttpServletRequest req,
HttpServletResponse res)
throws IOException, ServletException
int marker=0;
int i=0;
int counter1=0;
int header=0;
String QryString="";
Connection con=null;
// res.setContentType("text/html");
res.setContentType("application/vnd.ms-excel");
PrintWriter out = res.getWriter();
out.println("<HTML><HEAD><TITLE>Chart Summary</TITLE></HEAD>");
out.println("<BODY>");
out.println("<table width=100% border=1>");
out.println("<tr><td>");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
String url = "jdbc:odbc:INFO1";
try {
con = DriverManager.getConnection(url, "info1", "info1");
} catch(Exception e){
System.err.print("Not able to Connect to Access");
marker=1;
if (marker == 0)
System.out.println("Connected successfully to MS Access");
String query = "SELECT Date, NoOfRecs FROM ";
if("UPLOAD".equals(req.getParameter("Flow")))
query = query + "TBL_UPLOAD_SUM";
if(req.getParameter("FldFCTName").length() > 0)
if (QryString != "")
query = query + " AND FCTName LIKE '" + req.getParameter("FldFCTName") + "%'";
else
query = query + " WHERE FCTName like '" + req.getParameter("FldFCTName") + "'";
QryString = "SET";
else
query = query + "TBL_DWNLOAD_REC";
if(req.getParameter("FldFCTName").length() > 0)
if (QryString != "")
query = query + " AND FCTName LIKE '" + req.getParameter("FldFCTName") + "'";
else
query = query + " WHERE FCTName like '" + req.getParameter("FldFCTName") + "%'";
QryString = "SET";
query = query + " ORDER BY Date";
try {
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
out.write("\n");
FileOutputStream out1; // declare a file output object
PrintStream p; // declare a print stream object
out1 = new FileOutputStream("./SureshServ/FileStats.csv");
// Connect print stream to the output stream
p = new PrintStream( out1 );
out.println("<TABLE>");
while (rs.next()) {
String[] Fields = new String[2];
counter1++;
Fields[0] = rs.getString("Date");
Fields[1] = rs.getString("NoOfRecs");
p.println(Fields[0] + "," + (Fields[1].substring(1,Fields[1].length() - 1)));
out.println("<TR><TD>" + Fields[0] + "</TD><TD>" + Fields[1] + "</TD></TR>");
out.println("</TABLE>");
p.close();
rs.close();
}catch(Exception e){
System.err.print("Problem Fetching Fields");
out.println("<CENTER><B>Chart Summary</B></CENTER>");
if(counter1 == 0)
out.println("No records found for the selection");
out.println("</TD></TR></TABLE><BR>");
out.println("</BODY></HTML>");
out.close();It is hard to do it.
I found that a java report tool Style/Report can do it very well.
peter
JawaBeginer (A useful JavaIDE tool)
http://www.pivotonic.com -
I want to do my sample of the project following these steps.
I
1. Create the template for compare other objects.
2. Save the template and ready for compare realtime with other objects
II
1. Use the CCTV video camera Sony capture the picture of the object (lego toys).
2. Calculate the size of the objects and change to mm.
3. Compare with the template and plot graph(Control chart) by length
4. Export the data to Excel Files
Solved!
Go to Solution.Nice project !
I sincerely hope you are not expecting us to do your homework.
What is your experience with LabVIEW ?
May be you should try to start to code something and then come back later with some more specific question ?
Message Edité par chilly charly le 01-02-2009 08:40 AM
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
How can we put excel file in a sahred folder of target system
Hi All,
I have the requirement as fallows
1) I will get the data from report to an excel file. This Excel file has to send mail to the specified users in the distribution list.
2) The same excel file I need to put it in share folder like suppose say
BSDGuest\Guest( this folder will be in another system not application server).
Here the exact requirement is, When ever I want to put the excel in the shared folder, need to validate the user authorizations (ID, Pwd & folder).
I am able send a mail but I have no idea how to go for the second requirement. As per my knowledge it can be done through FTP_COMMAND function module along with some other function modules.
I would appreciate if any one helps me in the regard.
Thanks in advance.
With Best Regards
VenkatHi Venkat,
See this coding.
CONCATENATE 'put UEMPORDE0' '
' sy-host '\Order\salesord_t_e'
INTO gv_name3.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = lv_hdl
command = gv_name3
compress = lv_compress
TABLES
data = lt_result
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
Rajesh -
How to use FTP_COMMAND to put a file in the target system
Hi All,
I have the requirement to put an excel file from apllication server to another remote system for this i am using the function modules
1) FTP_CONNECT to connect to the sourece as well as the destination systems --- Here i am able to hit the both systems.
2) for sending the data to the target system i am using FTP_COMMAND by passing the 'put' statement along with the soruce and destinations for the command parameter.
See the bellow code
CONCATENATE 'put' v_fname '
' 'wbrs1\' folder
into cmd separated by space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
HANDLE = dhdl
command = cmd
COMPRESS = 'N'
VERIFY =
RFC_DESTINATION =
IMPORTING
FILESIZE =
FILEDATE =
FILETIME =
tables
data = result
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4
Here v_name is the file path and name in the application server suppose say :
/usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS
and wbrs1 is the target system and 'Waynesboro DFS' is the folder name i ma passing to the command .
Also I tried with the following statement
CONCATENATE 'put' v_fname '
' dhost folder
into cmd separated by space.
Here v_name is the file path and name in the application server suppose say :
/usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS,
Dhost is wbrs1.wb.na.webdti.com
And Waynesboro DFS is the folder .
Here i am getting the error as invalid argument.
See the bellow messages from result internal table.
put /usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS
wbrs1\ Waynesboro DFS
open /usr/sap/TD2/DVEBMGS01/work/TD2_20060901_1008_WAY-LY.XLS errno 22: Invalid argument
Please let me know how i can resolve this problem and how can I put this file in the destination system.
Thanks in advance.
Regards,
Venkatcheck this code....here data is transferred from SAP to Informatica box..
REPORT zfo_phoenix_acc_reconciliation NO STANDARD PAGE HEADING
MESSAGE-ID zz
LINE-SIZE 255
LINE-COUNT 65.
PROGRAM DECLARATION
PROGRAM ID : ZFO_PHOENIX_ACC_RECONCILIATION
DESCRIPTION : Phoneix Account Reconcilation Program-Feed
Balance sheet account balances from GL
3 files needed to be enhanced. The files are " Master
Attribute File" & "Transaction File(GL Balance)". For
Master Attribute File, data needs to be retrieved from
T001, ZDATSRC_T, SKA1, T003, T856. The corresponding
data from all the tables is downloaded into file
according to the condition specified. For Transaction
File, data needs to be retrieved from ZGEIST based on
Ledger(GG), Record Type(0), Fiscal Year, Period(016).
Then the current period is used to determine which TSLxx
& KSLxx needs to be used. Also, the conditions are
specified in specs which have been used accordingly.
The final data fetched will need to processed as files
which neednot be downloaded to Presentation/Application
server. Instead the files are been FTPed to the
Informatica Server using FTP. The location where the
files need to be located is ERC\GLOBALSAP.
TABLES
TABLES : ADR6.
TYPES
Output File - Master COA(Chart of Account)
TYPES : BEGIN OF ty_coacode ,
coa_code(20), "COA Code
coa_description(50), "COA Description
field11 TYPE x, "Line Feed
END OF ty_coacode.
Output File - Master Account
TYPES : BEGIN OF ty_acctcode ,
act_code(20), "GL Account Number
act_desc(60), "GL Account Description
act_act_flag(1), "Account marked for deletion indicator
glact_type(1), "GL Account type
fi_line(20), "Corporate Financial Statement Line
coa_code(20), "COA Code
act_defcode(3), "Account Defination Code
field11 TYPE x, "Line Feed
END OF ty_acctcode.
Output File - Master Entity
TYPES : BEGIN OF ty_entitycode,
entity_code(12), "Entity Code
com_desc(40), "Company Name
coa_code(20), "COA Code
field11 TYPE x, "Line Feed
END OF ty_entitycode.
Output File - Master Attribute
TYPES : BEGIN OF ty_attribcode,
attrib_code(5), "Attribute Code
attrib_value(20), "Attribute Value
attrib_desc(60), "Attribute Description
field11 TYPE x, "Line Feed
END OF ty_attribcode.
Output File - Transaction GL Balance
TYPES : BEGIN OF ty_glbal,
gl_reccode(2), "GL Reconciliation Code
gl_entity(12), "GL Entity - Company Code
gl_accnum(20), "Gl Group Account Number
site(4), "Site
currency_type(6), "Transaction Currency Code
year(4) TYPE n, "Year
month(2) TYPE n, "Month
as_of_date(8), "Date Account Balance
tran_cur_amt(21), "Transaction Currency Amount
usd_amount(21), "USD Amount
racct(20), "GL Account Number
zzbewar(20), "Consolidation Transaction Type
zzdatsrc(20), "Data Source
zzblart(20), "Document Type
rassc(20), "Trading Partner
field1(20), "Attribute field1
field2(20), "Attribute field2
field3(20), "Attribute field3
field4(20), "Attribute field4
field5(20), "Attribute field5
field11 TYPE x, "Line Feed
END OF ty_glbal.
Output File - Control
TYPES :BEGIN OF ty_globalsap,
clnt_name(6), "Client Name
source_name(12), "Source Name
as_of_date(8), "AS of Date
time_stamp(6), "Time Stamp
time_zone(8), "Time Zone
num_of_files(3), "Number of Files
num_of_records(9), "Number of Records
user_ids(60), "User ID(s)
field11 TYPE x, "Line Feed
END OF ty_globalsap.
Int'table to hold ZGEIST Data
TYPES : BEGIN OF ty_zgeist_data,
rldnr TYPE rldnr, "Ledger
rrcty TYPE rrcty, "Record Type
rvers TYPE rvers, "Version
ryear TYPE gjahr, "Fiscal Year
rbukrs TYPE bukrs, "Company Code
racct TYPE racct, "Account Number
robjnr TYPE gobjnr_r, "Object Number for objects
cobjnr TYPE gobjnr_c, "Object Number for transaction
sobjnr TYPE gobjnr_s, "Object Number for partner
rtcur TYPE rtcur, "Currency Key
runit TYPE meins, "Base Unit of Measure
drcrk TYPE shkzg, "Debit/Credit Indicator
rpmax TYPE rpmax, "Period
rzzstagr TYPE stagr, "Statistical key figure
zzaltkt TYPE altkt, "Account Number in Group
zzdatsrc TYPE zdatsrc, "Data Source code
zzbewar TYPE rmvct, "Transaction Type
zzblart TYPE blart, "Document Type
rassc TYPE rassc, "Trading Partner
zzvbund TYPE rassc, "Trading Partner
tslvt TYPE tslvt9, "Transactional Currency
kslvt TYPE kslvt9, "Group Currency
END OF ty_zgeist_data.
Int'table to hold ZGEIST Error Data based on conditions
TYPES : BEGIN OF ty_zgeist_error_data,
rldnr TYPE rldnr, "Ledger
rrcty TYPE rrcty, "Record Type
rvers TYPE rvers, "Version
ryear TYPE gjahr, "Fiscal Year
rbukrs TYPE bukrs, "Company Code
robjnr TYPE gobjnr_r, "Object Number for objects
cobjnr TYPE gobjnr_c, "Object Number for transaction
sobjnr TYPE gobjnr_s, "Object Number for partner
rtcur TYPE rtcur, "Currency Key
runit TYPE meins, "Base Unit of Measure
drcrk TYPE shkzg, "Debit/Credit indicator
rpmax TYPE rpmax, "Period
END OF ty_zgeist_error_data.
FIELD SYMBOLS
FIELD-SYMBOLS : <fs> TYPE ANY.
CONSTANTS
DATA : c_selected TYPE c VALUE 'X', "Field for constant value 'X'
c_y TYPE c VALUE 'Y', "For Acc marked for deletion
c_n TYPE c VALUE 'N', "For Acc not marked for deletion
c_a TYPE c VALUE 'A', "For GL Account type Asset
c_l TYPE c VALUE 'L', "For GL Account type Liability
c_q TYPE c VALUE 'Q', "For GL Account type Equity
c_r TYPE c VALUE 'R', "For GL Account type Revenue
c_e TYPE c VALUE 'E', "For GL Account type Expense
c_t TYPE c VALUE 'T', "For GL Account type
c_userid(60) TYPE c ,
c_curtp TYPE curtp VALUE '10', "Currency type
c_curtp1 TYPE curtp VALUE '30', "Currency type
c_rassc(5) TYPE c VALUE 'RASSC', "Trading Partner
c_dtsrce(6) TYPE c VALUE 'DTSRC', "Data Source
c_sacct(5) TYPE c VALUE 'SACCT', "GL Account
c_docty(5) TYPE c VALUE 'DOCTY', "Document Type
c_trxtp(5) TYPE c VALUE 'TRXTP', "Transaction Type
c_tradptn(15) TYPE c VALUE 'Trading Partner', "Trading Partner
c_datsrc(11) TYPE c VALUE 'Data Source', "Data Source
c_glacc(10) TYPE c VALUE 'GL Account', "GL Account
c_doctyp(13) TYPE c VALUE 'Document Type', "Document Type
c_trantyp(16) TYPE c VALUE 'Transaction Type'. "Transaction Type
DATA (Simple Fields)
DATA: w_cnt1 TYPE i, "No Of records in output file COA Code
w_cnt2 TYPE i, "No Of records in output file Account
w_cnt3 TYPE i, "No Of records in output file Entity
w_cnt4 TYPE i, "No Of records in output file attribute
w_cnt5 TYPE i, "No Of records in output file GL Balance
w_tot_recs TYPE i, "TOtal number of records downloaded
w_date LIKE sy-datum, "System date
w_timediff LIKE sy-uzeit, "Time Difference to GMT
w_timezone(10) TYPE c, "Time Difference to GMT
w_file_count(3) TYPE n, "File Count
w_period TYPE poper, "To hold Period Value
w_year LIKE t009b-bdatj, "To hold Fiscal Year Value
w_outfile TYPE char64, "FTPed file path
w_hdl TYPE i. "Handle for FTP
INTERNAL TABLES
Intenal table for GL Account details
DATA: BEGIN OF it_gl_detail OCCURS 0,
saknr TYPE saknr,
txt50_skat TYPE txt50_skat,
xloev TYPE xloev,
END OF it_gl_detail.
DATA: it_company_list LIKE bapi0014_1 OCCURS 0 WITH HEADER LINE,
it_coacode TYPE STANDARD TABLE OF ty_coacode WITH HEADER LINE,
it_acctcode TYPE STANDARD TABLE OF ty_acctcode WITH HEADER LINE,
it_entitycode TYPE STANDARD TABLE OF ty_entitycode
WITH HEADER LINE,
it_attribcode TYPE STANDARD TABLE OF ty_attribcode
WITH HEADER LINE,
it_glbal TYPE STANDARD TABLE OF ty_glbal WITH HEADER LINE,
it_globalsap TYPE STANDARD TABLE OF ty_globalsap WITH HEADER LINE,
it_t001 TYPE STANDARD TABLE OF t001 WITH HEADER LINE,
it_zdatsrc TYPE STANDARD TABLE OF zdatsrc_t WITH HEADER LINE,
it_ska1 TYPE STANDARD TABLE OF ska1 WITH HEADER LINE,
it_t003 TYPE STANDARD TABLE OF t003 WITH HEADER LINE,
it_t856 TYPE STANDARD TABLE OF t856 WITH HEADER LINE,
it_zgeist_data TYPE STANDARD TABLE OF ty_zgeist_data
WITH HEADER LINE,
it_zgeist_data1 TYPE STANDARD TABLE OF ty_zgeist_data
WITH HEADER LINE,
it_zgeist_data_all TYPE STANDARD TABLE OF zgeist,
wa_it_zgeist_data1 TYPE ty_zgeist_data,
wa_it_zgeist_data TYPE zgeist,
it_zgeist_error_data TYPE STANDARD TABLE OF ty_zgeist_error_data,
wa_it_zgeist_error_data TYPE ty_zgeist_error_data.
SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-009.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-006,
POSITION POS_LOW.
PARAMETERS : P_USER(30) TYPE C LOWER CASE OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-007,
POSITION POS_LOW.
PARAMETERS : P_PWD(30) TYPE C LOWER CASE OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-008,
POSITION POS_LOW.
PARAMETERS : P_HOST(64) TYPE C LOWER CASE OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-010,
POSITION POS_LOW.
SELECT-OPTIONS : S_EMAIL FOR ADR6-SMTP_ADDR NO INTERVALS.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
-- Password not visible--
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_PWD'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
I N I T I A L I Z A T I O N *
INITIALIZATION.
w_date0(2) = sy-datum4(2).
w_date2(2) = sy-datum6(2).
w_date4(4) = sy-datum0(4).
S_EMAIL-SIGN = 'I'.
S_EMAIL-OPTION = 'EQ'.
S_EMAIL-LOW = '[email protected]'.
APPEND S_EMAIL.
S_EMAIL-SIGN = 'I'.
S_EMAIL-OPTION = 'EQ'.
S_EMAIL-LOW = '[email protected]'.
APPEND S_EMAIL.
START - OF - SELECTION
START-OF-SELECTION.
Geting Company Details
PERFORM get_company_list.
Geting GL Account Details
PERFORM get_gl_acc_detail.
Geting GL Balance Details
PERFORM get_zgeist_data.
END - OF - SELECTION
PERFORM process_coacode.
PERFORM process_acctcode.
PERFORM process_entitycode.
PERFORM process_attribcode.
PERFORM process_glbal.
PERFORM process_ftp_file.
IF NOT it_zgeist_error_data[] IS INITIAL.
PERFORM write_error_report.
ENDIF.
*& Form GET_COMPANY_LIST
Form to get Company List *
FORM get_company_list.
CALL FUNCTION 'BAPI_COMPANY_GETLIST'
TABLES
company_list = it_company_list.
ENDFORM. "GET_COMPANY_LIST
*& Form GET_GL_ACC_DETAIL
Form to get the GL Account details *
FORM get_gl_acc_detail.
DATA : l_txt50 LIKE skat-txt50,
l_tabix LIKE sy-tabix.
SELECT saknr xloev
INTO TABLE it_gl_detail
FROM ska1
WHERE ktopl = 'G001'
AND ( saknr GE '1000000000' AND saknr LE '4500000000' ).
LOOP AT it_gl_detail.
l_tabix = sy-tabix.
SELECT SINGLE txt50
INTO l_txt50
FROM skat
WHERE spras = 'EN'
AND ktopl = 'G001'
AND saknr = it_gl_detail-saknr.
it_gl_detail-txt50_skat = l_txt50.
MODIFY it_gl_detail INDEX l_tabix.
CLEAR l_txt50.
ENDLOOP.
ENDFORM. "GET_GL_ACC_DETAIL
*& Form PROCESS_COACODE
Form to Populate COA data to Output internal table IT_COACODE *
FORM process_coacode.
it_coacode-coa_code = text-023. "GLOBAL.
it_coacode-coa_description = text-022. "Global SAP for ERC
it_coacode-field11 = '11'.
APPEND it_coacode.
CLEAR it_coacode.
ENDFORM. "PROCESS_COACODE
*& Form PROCESS_ACCTCODE
Form to Populate Account data to Output Internal table IT_ACCTCODE *
FORM process_acctcode.
DATA:l_saknr(10).
DATA : it_gl_detail2 LIKE it_gl_detail OCCURS 0 WITH HEADER LINE.
IF NOT it_gl_detail[] IS INITIAL.
it_gl_detail2[] = it_gl_detail[].
SORT it_gl_detail2 BY saknr.
DELETE ADJACENT DUPLICATES FROM it_gl_detail2 COMPARING saknr.
ENDIF.
IF NOT it_gl_detail2[] IS INITIAL.
LOOP AT it_gl_detail2.
MOVE it_gl_detail2-saknr TO it_acctcode-act_code.
MOVE it_gl_detail2-txt50_skat TO it_acctcode-act_desc.
Check GL Account is marked for deletion or not
IF it_gl_detail2-xloev = c_selected.
it_acctcode-act_act_flag = c_n.
ELSE.
it_acctcode-act_act_flag = c_y.
ENDIF.
Determine GL Account type based on GL account number
l_saknr = it_gl_detail2-saknr.
SHIFT l_saknr LEFT DELETING LEADING '0'.
IF l_saknr CP '1*'.
it_acctcode-glact_type = c_a.
ELSEIF l_saknr CP '2*'.
it_acctcode-glact_type = c_l.
ELSEIF l_saknr CP '3*'.
it_acctcode-glact_type = c_q.
Start of Addition by C.Ramesh Babu on 11/04/2005 "DR1K907900
ELSEIF l_saknr CP '4*'.
it_acctcode-glact_type = c_l.
End of Addition by C.Ramesh Babu on 11/04/2005 "DR1K907900
ELSEIF l_saknr CP '5*'.
it_acctcode-glact_type = c_r.
ELSEIF l_saknr CP '6*'.
it_acctcode-glact_type = c_e.
ELSEIF l_saknr CP '7*'.
it_acctcode-glact_type = c_t.
ENDIF.
it_acctcode-fi_line = 'CDR'.
it_acctcode-coa_code = 'GLOBAL'.
it_acctcode-act_defcode = '001'.
it_acctcode-field11 = '11'.
APPEND :it_acctcode.
CLEAR :it_acctcode,it_gl_detail2.
ENDLOOP.
ENDIF.
ENDFORM. "PROCESS_ACCTCODE
*& Form PROCESS_ENTITYCODE
Form to Populate Entiti data to Output file internal table *
FORM process_entitycode.
IF NOT it_company_list[] IS INITIAL.
LOOP AT it_company_list.
SHIFT it_company_list-company LEFT DELETING LEADING '0'.
MOVE it_company_list-company TO it_entitycode-entity_code.
MOVE it_company_list-name1 TO it_entitycode-com_desc.
it_entitycode-coa_code = 'GLOBAL'.
it_entitycode-field11 = '11'.
APPEND it_entitycode.
CLEAR : it_company_list,it_entitycode.
ENDLOOP.
ENDIF.
ENDFORM. "PROCESS_ENTITYCODE
*& Form PROCESS_ATTRIBCODE
Form to Populate Attribute data to output file internal table *
FORM process_attribcode.
Getting data from T001.
SELECT * FROM t001 INTO TABLE it_t001.
LOOP AT it_t001.
MOVE c_rassc TO it_attribcode-attrib_code.
MOVE it_t001-bukrs TO it_attribcode-attrib_value.
MOVE c_tradptn TO it_attribcode-attrib_desc.
it_attribcode-field11 = '11'.
APPEND it_attribcode.
CLEAR it_attribcode.
ENDLOOP.
Getting data from table ZDATSRC_T.
SELECT * FROM zdatsrc_t INTO TABLE it_zdatsrc.
LOOP AT it_zdatsrc.
MOVE c_dtsrce TO it_attribcode-attrib_code.
MOVE it_zdatsrc-zdatsrc TO it_attribcode-attrib_value.
MOVE c_datsrc TO it_attribcode-attrib_desc.
it_attribcode-field11 = '11'.
APPEND it_attribcode.
CLEAR it_attribcode.
ENDLOOP.
Getting data from table SKA1.
SELECT * FROM ska1 INTO TABLE it_ska1.
LOOP AT it_ska1.
MOVE c_sacct TO it_attribcode-attrib_code.
MOVE it_ska1-saknr TO it_attribcode-attrib_value.
MOVE c_glacc TO it_attribcode-attrib_desc.
it_attribcode-field11 = '11'.
APPEND it_attribcode.
CLEAR it_attribcode.
ENDLOOP.
Getting data from table T003.
SELECT * FROM t003 INTO TABLE it_t003.
LOOP AT it_t003.
MOVE c_docty TO it_attribcode-attrib_code.
MOVE it_t003-blart TO it_attribcode-attrib_value.
MOVE c_doctyp TO it_attribcode-attrib_desc.
it_attribcode-field11 = '11'.
APPEND it_attribcode.
CLEAR it_attribcode.
ENDLOOP.
Getting data from table T856.
SELECT * FROM t856 INTO TABLE it_t856.
LOOP AT it_t856.
MOVE c_trxtp TO it_attribcode-attrib_code.
MOVE it_t856-trtyp TO it_attribcode-attrib_value.
MOVE c_trantyp TO it_attribcode-attrib_desc.
it_attribcode-field11 = '11'.
APPEND it_attribcode.
CLEAR it_attribcode.
ENDLOOP.
ENDFORM. "PROCESS_ATTRIBCODE
*& Form PROCESS_GLBAL
Form to Populate GL Balance data to Output file internal table *
FORM process_glbal.
DATA : l_ctran_amt(21),
l_cusd_amt(21).
LOOP AT it_zgeist_data INTO wa_it_zgeist_data1.
*Start of change by 501030559 on 11/04/2005
it_glbal-gl_reccode = '04'.
it_glbal-gl_reccode = '05'.
*End of change by 501030559 on11/04/2005
it_glbal-gl_entity = wa_it_zgeist_data1-rbukrs.
it_glbal-gl_accnum = wa_it_zgeist_data1-zzaltkt.
it_glbal-site = 'ERC'.
it_glbal-currency_type = wa_it_zgeist_data1-rtcur.
it_glbal-year = w_year.
it_glbal-month = w_period.
it_glbal-as_of_date = w_date.
l_ctran_amt = wa_it_zgeist_data1-tslvt.
Put sign to left side of the value
IF l_ctran_amt LT 0.
TRANSLATE l_ctran_amt USING ' 0'.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
value = l_ctran_amt.
ELSE.
Trailing Zero's to the value
SHIFT l_ctran_amt RIGHT DELETING TRAILING space.
TRANSLATE l_ctran_amt USING ' 0'.
REPLACE '0' WITH '' INTO l_ctran_amt.
ENDIF.
it_glbal-tran_cur_amt = l_ctran_amt.
l_cusd_amt = wa_it_zgeist_data1-kslvt.
Put Sign to leftside of the value
IF l_cusd_amt LT 0.
TRANSLATE l_cusd_amt USING ' 0'.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
value = l_cusd_amt.
ELSE.
Trailing Zero's to the value
SHIFT l_cusd_amt RIGHT DELETING TRAILING space.
TRANSLATE l_cusd_amt USING ' 0'.
REPLACE '0' WITH '' INTO l_cusd_amt.
ENDIF.
it_glbal-usd_amount = l_cusd_amt.
it_glbal-racct = wa_it_zgeist_data1-racct.
it_glbal-zzbewar = wa_it_zgeist_data1-zzbewar.
it_glbal-zzdatsrc = wa_it_zgeist_data1-zzdatsrc.
it_glbal-zzblart = wa_it_zgeist_data1-zzblart.
it_glbal-rassc = wa_it_zgeist_data1-rassc.
it_glbal-field11 = '11'.
APPEND it_glbal.
CLEAR : wa_it_zgeist_data1, it_glbal.
ENDLOOP.
ENDFORM. "PROCESS_GLBAL
*& Form PROCESS_GLOBALSAP
Form to Populate COntrol data to Output file internal table *
FORM process_globalsap.
DATA :l_total(9),
l_len(3) type c.
Logic to get Time Zone
w_timediff = sy-tzone.
IF sy-tzone LT '0'.
w_timediff = sy-tzone * -1.
CONCATENATE 'GMT-' w_timediff(4) INTO w_timezone.
ELSE.
w_timediff = sy-tzone.
CONCATENATE 'GMT+' w_timediff(4) INTO w_timezone.
ENDIF.
LOOP AT S_EMAIL.
CONCATENATE C_USERID S_EMAIL-LOW ',' INTO C_USERID.
ENDLOOP.
l_len = strlen( c_userid ).
l_len = l_len - 1.
c_userid = c_userid+0(l_len).
it_globalsap-clnt_name = 'ERC'.
it_globalsap-source_name = 'GLOBALSAP'.
it_globalsap-as_of_date = w_date.
it_globalsap-time_stamp = sy-uzeit.
it_globalsap-time_zone = w_timezone.
it_globalsap-num_of_files = w_file_count.
MOVE w_tot_recs TO l_total.
SHIFT l_total RIGHT DELETING TRAILING space.
TRANSLATE l_total USING ' 0'.
it_globalsap-num_of_records = l_total.
it_globalsap-user_ids = c_userid.
it_globalsap-field11 = '11'.
APPEND it_globalsap.
CLEAR it_globalsap.
ENDFORM. "PROCESS_GLOBALSAP
*& Form COUNT_RECORDS
Form to count total number of records Downlaoded *
FORM count_records.
DESCRIBE TABLE it_coacode LINES w_cnt1.
DESCRIBE TABLE it_acctcode LINES w_cnt2.
DESCRIBE TABLE it_entitycode LINES w_cnt3.
DESCRIBE TABLE it_attribcode LINES w_cnt4.
DESCRIBE TABLE it_glbal LINES w_cnt5.
w_tot_recs = w_cnt1 + w_cnt2 + w_cnt3 + w_cnt4 + w_cnt5.
ENDFORM. "COUNT_RECORDS
*& Form get_zgeist_data
Form used to fetch data from ZGEIST table for the GL BAL file
FORM get_zgeist_data .
PERFORM get_period_year.
SELECT * INTO TABLE it_zgeist_data_all
FROM zgeist
WHERE rldnr EQ 'GG'
AND ryear EQ w_year
AND rrcty EQ 0
AND rpmax EQ '016'
AND ( zzaltkt GE '1000000000' AND zzaltkt LE '4500000000' )
AND rzzstagr = space.
sort it_zgeist_data_all by rbukrs rldnr zzaltkt racct
zzdatsrc zzbewar zzblart rtcur rassc.
LOOP AT it_zgeist_data_all INTO wa_it_zgeist_data.
IF wa_it_zgeist_data-zzaltkt EQ space.
wa_it_zgeist_error_data-rldnr = wa_it_zgeist_data-rldnr.
wa_it_zgeist_error_data-rrcty = wa_it_zgeist_data-rrcty.
wa_it_zgeist_error_data-rvers = wa_it_zgeist_data-rvers.
wa_it_zgeist_error_data-ryear = wa_it_zgeist_data-ryear.
wa_it_zgeist_error_data-rbukrs = wa_it_zgeist_data-rbukrs.
wa_it_zgeist_error_data-robjnr = wa_it_zgeist_data-robjnr.
wa_it_zgeist_error_data-cobjnr = wa_it_zgeist_data-cobjnr.
wa_it_zgeist_error_data-sobjnr = wa_it_zgeist_data-sobjnr.
wa_it_zgeist_error_data-rtcur = wa_it_zgeist_data-rtcur.
wa_it_zgeist_error_data-runit = wa_it_zgeist_data-runit.
wa_it_zgeist_error_data-drcrk = wa_it_zgeist_data-drcrk.
wa_it_zgeist_error_data-rpmax = wa_it_zgeist_data-rpmax.
APPEND wa_it_zgeist_error_data TO it_zgeist_error_data.
ELSE.
it_zgeist_data1-rbukrs = wa_it_zgeist_data-rbukrs.
it_zgeist_data1-rldnr = wa_it_zgeist_data-rldnr.
it_zgeist_data1-zzaltkt = wa_it_zgeist_data-zzaltkt.
it_zgeist_data1-racct = wa_it_zgeist_data-racct.
it_zgeist_data1-zzdatsrc = wa_it_zgeist_data-zzdatsrc.
it_zgeist_data1-zzbewar = wa_it_zgeist_data-zzbewar.
it_zgeist_data1-zzblart = wa_it_zgeist_data-zzblart.
it_zgeist_data1-rassc = wa_it_zgeist_data-rassc.
it_zgeist_data1-rtcur = wa_it_zgeist_data-rtcur.
PERFORM get_tslvt_kslvt_values USING w_period.
COLLECT it_zgeist_data1.
ENDIF.
CLEAR : wa_it_zgeist_data, wa_it_zgeist_error_data,
it_zgeist_data1.
ENDLOOP.
it_zgeist_data[] = it_zgeist_data1[].
ENDFORM. " get_zgeist_data
*& Form write_error_report
Form used to display error data for the GL BAL fetched data
FORM write_error_report .
DATA : l_text(80) TYPE c.
CASE w_period.
WHEN '001' OR '01'.
l_text = text-e01.
WHEN '002' OR '02'.
l_text = text-e02.
WHEN '003' OR '03'.
l_text = text-e03.
WHEN '004' OR '04'.
l_text = text-e04.
WHEN '005' OR '05'.
l_text = text-e05.
WHEN '006' OR '06'.
l_text = text-e06.
WHEN '007' OR '07'.
l_text = text-e07.
WHEN '008' OR '08'.
l_text = text-e08.
WHEN '009' OR '09'.
l_text = text-e09.
WHEN '010' OR '10'.
l_text = text-e10.
WHEN '011' OR '11'.
l_text = text-e11.
WHEN '012' OR '12'.
l_text = text-e12.
WHEN '013' OR '13'.
l_text = text-e13.
WHEN '014' OR '14'.
l_text = text-e14.
WHEN '015' OR '15'.
l_text = text-e15.
WHEN '016' OR '16'.
l_text = text-e16.
ENDCASE.
SKIP 2.
WRITE:/45 text-h01 COLOR COL_HEADING.
SKIP 2.
FORMAT COLOR 4.
WRITE:/(234) sy-uline.
WRITE:/1 sy-vline,
2 text-h02,
9 sy-vline,
10 text-h03,
19 sy-vline,
20 text-h04,
28 sy-vline,
29 text-h05,
41 sy-vline,
42 text-h06,
49 sy-vline,
50 text-h07,
69 sy-vline,
70 text-h08,
89 sy-vline,
90 text-h09,
109 sy-vline,
110 text-h10,
119 sy-vline,
120 text-h11,
130 sy-vline,
131 text-h12,
144 sy-vline,
145 text-h13,
152 sy-vline,
153 text-h14,
234 sy-vline.
WRITE:/(234) sy-uline.
FORMAT COLOR OFF.
LOOP AT it_zgeist_error_data INTO wa_it_zgeist_error_data.
FORMAT COLOR 2.
WRITE:/1 sy-vline,
4 wa_it_zgeist_error_data-rldnr,
9 sy-vline,
13 wa_it_zgeist_error_data-rrcty,
19 sy-vline,
22 wa_it_zgeist_error_data-rvers,
28 sy-vline,
32 wa_it_zgeist_error_data-ryear,
41 sy-vline,
42 wa_it_zgeist_error_data-rbukrs,
49 sy-vline,
50 wa_it_zgeist_error_data-robjnr,
69 sy-vline,
70 wa_it_zgeist_error_data-cobjnr,
89 sy-vline,
90 wa_it_zgeist_error_data-sobjnr,
109 sy-vline,
112 wa_it_zgeist_error_data-rtcur,
119 sy-vline,
123 wa_it_zgeist_error_data-runit,
130 sy-vline,
135 wa_it_zgeist_error_data-drcrk,
144 sy-vline,
147 wa_it_zgeist_error_data-rpmax,
152 sy-vline,
153 l_text,
234 sy-vline.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/(234) sy-uline.
ENDFORM. " write_error_report
*& Form get_tslvt_kslvt_values
Form used to get TSLxx & KSLxx values for the period fetched
FORM get_tslvt_kslvt_values USING period.
FIELD-SYMBOLS : <f1> TYPE ANY,
<f2> TYPE ANY.
DATA : l_tslvt_val(25) VALUE 'wa_it_zgeist_data-tsl',
l_kslvt_val(25) VALUE 'wa_it_zgeist_data-ksl',
l_tslvt TYPE tslvt9,
l_kslvt TYPE kslvt9,
l_period TYPE poper.
clear l_period.
l_period = period.
DO l_period TIMES.
CONCATENATE l_tslvt_val l_period+1(2) INTO l_tslvt_val.
CONCATENATE l_kslvt_val l_period+1(2) INTO l_kslvt_val.
ASSIGN (l_tslvt_val) TO <f1>.
l_tslvt = <f1>.
it_zgeist_data1-tslvt = it_zgeist_data1-tslvt + l_tslvt.
ASSIGN (l_kslvt_val) TO <f2>.
l_kslvt = <f2>.
it_zgeist_data1-kslvt = it_zgeist_data1-kslvt + l_kslvt.
l_period = l_period - 1.
clear : l_tslvt, l_kslvt, l_tslvt_val, l_kslvt_val.
l_tslvt_val = 'wa_it_zgeist_data-tsl'.
l_kslvt_val = 'wa_it_zgeist_data-ksl'.
if l_period = 0.
exit.
endif.
ENDDO.
ENDFORM. "get_tslvt_kslvt_values
*& Form process_ftp_file
Form used to connect & disconnect to Informatica Server using FTP
Also, used to transfer files to the Informatica location
--> p1 text
<-- p2 text
FORM process_ftp_file .
DATA: l_slen TYPE i,
l_error,
l_pwd(30) TYPE c.
CONSTANTS: c_dest TYPE rfcdes-rfcdest VALUE 'SAPFTP',
c_key TYPE i VALUE 26101957.
l_error = 0.
connect to ftp server
l_pwd = p_pwd.
l_slen = STRLEN( l_pwd ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = l_pwd
sourcelen = l_slen
key = c_key
IMPORTING
destination = l_pwd.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Connect to FTP Server'.
To Connect to the Server using FTP
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = p_user
password = l_pwd
host = p_host
rfc_destination = c_dest
IMPORTING
handle = w_hdl
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR : w_outfile, w_file_count.
MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_COACODE' TO w_outfile.
PERFORM download_to_ftp TABLES it_coacode USING w_outfile.
w_file_count = w_file_count + 1.
CLEAR : w_outfile.
MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_ACCTCODE' TO w_outfile.
PERFORM download_to_ftp TABLES it_acctcode USING w_outfile.
w_file_count = w_file_count + 1.
CLEAR : w_outfile.
MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_ENTITYCODE' TO w_outfile.
PERFORM download_to_ftp TABLES it_entitycode USING w_outfile.
w_file_count = w_file_count + 1.
CLEAR : w_outfile.
MOVE 'ERC/GLOBALSAP/M_ERC_GLOBALSAP_ATTRIBCODE' TO w_outfile.
PERFORM download_to_ftp TABLES it_attribcode USING w_outfile.
w_file_count = w_file_count + 1.
CLEAR : w_outfile.
MOVE 'ERC/GLOBALSAP/ERC_GLOBALSAP_GLBAL' TO w_outfile.
PERFORM download_to_ftp TABLES it_glbal USING w_outfile.
w_file_count = w_file_count + 1.
CLEAR : w_outfile, w_tot_recs.
PERFORM count_records.
PERFORM process_globalsap.
MOVE 'ERC/GLOBALSAP/C_ERC_GLOBALSAP' TO w_outfile.
PERFORM download_to_ftp TABLES it_globalsap USING w_outfile.
To disconnect the FTP
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = w_hdl.
To disconnect the RFC Connection
CALL FUNCTION 'RFC_CONNECTION_CLOSE'
EXPORTING
destination = c_dest
EXCEPTIONS
OTHERS = 1.
ENDFORM. " process_ftp_file
*& Form download_to_ftp
Form to put the files in the Informatica Location using FTP
Path is ERC\GLOBALSAP\<filename>
FORM download_to_ftp TABLES it_tab
USING l_string TYPE char64.
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = w_hdl
fname = l_string
character_mode = 'X'
TABLES
text = it_tab[]
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
RAISING invalid_output_file.
ENDIF.
ENDFORM. " download_to_ftp
*& Form get_period_year
Form to fill the Period & Year based on the Sy-datum
FORM get_period_year .
DATA : l_month(2) TYPE c,
l_day(2) TYPE c,
l_year(4) TYPE c.
l_year = sy-datum+0(4).
l_month = sy-datum+4(2).
l_day = sy-datum+6(2).
CASE l_month.
WHEN '01'.
IF l_day <= '15'.
w_period = '12'.
w_year = l_year - 1.
ELSE.
w_period = '1'.
w_year = l_year.
ENDIF.
WHEN '02'.
IF l_day <= '15'.
w_period = '1'.
w_year = l_year.
ELSE.
w_period = '2'.
w_year = l_year.
ENDIF.
WHEN '03'.
IF l_day <= '15'.
w_period = '2'.
w_year = l_year.
ELSE.
w_period = '3'.
w_year = l_year.
ENDIF.
WHEN '04'.
IF l_day <= '15'.
w_period = '3'.
w_year = l_year.
ELSE.
w_period = '4'.
w_year = l_year.
ENDIF.
WHEN '05'.
IF l_day <= '15'.
w_period = '4'.
w_year = l_year.
ELSE.
w_period = '5'.
w_year = l_year.
ENDIF.
WHEN '06'.
IF l_day <= '15'.
w_period = '5'.
w_year = l_year.
ELSE.
w_period = '6'.
w_year = l_year.
ENDIF.
WHEN '07'.
IF l_day <= '15'.
w_period = '6'.
w_year = l_year.
ELSE.
w_period = '7'.
w_year = l_year.
ENDIF.
WHEN '08'.
IF l_day <= '15'.
w_period = '7'.
w_year = l_year.
ELSE.
w_period = '8'.
w_year = l_year.
ENDIF.
WHEN '09'.
IF l_day <= '15'.
w_period = '8'.
w_year = l_year.
ELSE.
w_period = '9'.
w_year = l_year.
ENDIF.
WHEN '10'.
IF l_day <= '15'.
w_period = '9'.
w_year = l_year.
ELSE.
w_period = '10'.
w_year = l_year.
ENDIF.
WHEN '11'.
IF l_day <= '15'.
w_period = '10'.
w_year = l_year.
ELSE.
w_period = '11'.
w_year = l_year.
ENDIF.
WHEN '12'.
IF l_day <= '15'.
w_period = '11'.
w_year = l_year.
ELSE.
w_period = '12'.
w_year = l_year.
ENDIF.
ENDCASE.
ENDFORM. " get_period_year -
Data refresh of Excel file on Sharepoint 2013 Online (E3)
Is it possible to refresh data in an Excel PowerPivot model from external data (SQL Server 2012) on the
SharePoint 2013 Online solution that comes with the Office365 E3 plan?
I need to either have the Excel file itself on the public facing website with data refresh there, or possibly have the Excel file in a private Business Intelligence Center subsite and then publish webparts or whatever on the public site, as long as the charts
are refreshed and publicly viewable. I've found a lot of conflicting info on this.
Re
DCurrently, when a workbook that contains a Data Model is published to a library in Office 365, data refresh is unavailable.
However, you can use a PowerShell script to configure a workaround.
donwload this white paper for workaround:
http://technet.microsoft.com/en-us/library/jj992650.aspx
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
How to open a specific excel file by activex & overwrite by set_cell_value.vi
I've seen the 'Write Table and Chart to XL.llb', but how can i open an existing excel file/workbook/sheet and rewrite some of the data instead of open a new worksheet everytime? It may already shown in your examples somewhere, but since I'm new to activex/property node stuff, I can't figure it out. Your help is appretiated.
Thanks
AnthonyThe process is very similar. Starting with the example, open the diagram and you'll see a VI labled "Open Book" (The name of the VI is actually "Open New Workbook.vi". Right click on it and select Replace/Select a VI...
Now navigate to \\Labview 7.0\examples\comm\excelexamples.llb and select the file "Open Specific Workbook.vi". This VI has an input for specifying a filename to open.
Likewise, the example also calls a VI named "Open a New Worksheet.vi" replace that with "Open a Specific Worksheet.vi" (found in the same place).
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
How to make my waveform from excel file perodic in labview graph
Hi guys,
Previously I've made a vi which integrates the excel file, to plot the graph values in labview using the values in the excel file to give the me a better flexibility to decide what waveform i want it to be. Can i know how to actually make the graph periodic, as in the waveform repeats, because currently it can just plot out the waveform accordingly to the values i inserted in the excel. I've attached my vi and aso my csv file together. Thanks guy.
Attachments:
12.csv 1 KB
graph.vi 18 KBSo do you want to read the same values over again?
If that is what you wish to achieve then use waveform chart as opposed to waveform graph. I editted your code slightly so that you can see the different.
I hope this helps!
Mehak D.
Attachments:
graph.vi 18 KB -
After upgrade to 10.9.1 office for mac 2011 will not open most excel files.
After upgrade to 10.9.1 office for mac will not open most excel files. The files will open in open office. I have tried re-saving as excel file, no joy.
I have repaired permissions, no joy.
below are the results of EtreCheck scan.
Hardware Information:
MacBook Pro (13-inch, Early 2011)
MacBook Pro - model: MacBookPro8,1
1 2.3 GHz Intel Core i5 CPU: 2 cores
8 GB RAM
Video Information:
Intel HD Graphics 3000 - VRAM: 512 MB
System Software:
OS X 10.9.1 (13B42) - Uptime: 5 days 3:45:14
Disk Information:
Hitachi HTS545032B9A302 disk0 : (320.07 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) / [Startup]: 319.21 GB (64.84 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
OPTIARC DVD RW AD-5970H
USB Information:
Apple Inc. FaceTime HD Camera (Built-in)
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Computer, Inc. IR Receiver
FireWire Information:
Thunderbolt Information:
Apple Inc. thunderbolt_bus
Kernel Extensions:
org.virtualbox.kext.VBoxDrv (4.1.2)
org.virtualbox.kext.VBoxUSB (4.1.2)
com.logmein.driver.LogMeInSoundDriver (1.0.3 - SDK 10.5)
Startup Items:
VirtualBox: Path: /Library/StartupItems/VirtualBox
Launch Daemons:
[System] com.adobe.fpsaud.plist 3rd-Party support link
[System] com.logmein.logmeinblanker.plist 3rd-Party support link
[System] com.logmein.logmeinserver.plist 3rd-Party support link
[System] com.logmein.raupdate.plist 3rd-Party support link
[System] com.microsoft.office.licensing.helper.plist 3rd-Party support link
[System] com.oracle.java.Helper-Tool.plist 3rd-Party support link
[System] com.sharpcast.xfsmond.plist 3rd-Party support link
[System] com.teamviewer.teamviewer_service.plist 3rd-Party support link
[System] com.zeobit.MacKeeper.AntiVirus.plist 3rd-Party support link
[System] org.macosforge.xquartz.privileged_startx.plist 3rd-Party support link
Launch Agents:
[System] com.logmein.LMILaunchAgentFixer.plist 3rd-Party support link
[System] com.logmein.logmeingui.plist 3rd-Party support link
[System] com.logmein.logmeinguiagent.plist 3rd-Party support link
[System] com.logmein.logmeinguiagentatlogin.plist 3rd-Party support link
[System] com.oracle.java.Java-Updater.plist 3rd-Party support link
[System] com.teamviewer.teamviewer.plist 3rd-Party support link
[System] com.teamviewer.teamviewer_desktop.plist 3rd-Party support link
[System] org.macosforge.xquartz.startx.plist 3rd-Party support link
User Launch Agents:
[not loaded] .dat0157.000 (hidden)/Users/fboyd3/Library/Application Support/Spotify/SpotifyWebHelper
[not loaded] com.adobe.ARM.[...].plist 3rd-Party support link
[not loaded] com.google.keystone.agent.plist 3rd-Party support link
[not loaded] com.microsoft.LaunchAgent.SyncServicesAgent.plist 3rd-Party support link
[not loaded] com.spotify.webhelper.plist 3rd-Party support link
[not loaded] com.zeobit.MacKeeper.Helper.plist 3rd-Party support link
[not loaded] org.virtualbox.vboxwebsrv.plist 3rd-Party support link
User Login Items:
iTunesHelper
GrowlHelperApp
Alarm Clock
Canon IJ Network Scanner Selector2
Microsoft Database Daemon
SugarSync Manager
Neat
LogMeIn
Dropbox
Spotify
Spotify
AdobeResourceSynchronizer
Internet Plug-ins:
LogMeInSafari64: Version: 1.0.730 3rd-Party support link
OVSHelper: Version: 1.0 3rd-Party support link
Default Browser: Version: 537 - SDK 10.9
Flip4Mac WMV Plugin: Version: 3.0.0.126 - SDK 10.8 3rd-Party support link
AmazonMP3DownloaderPlugin101750: Version: AmazonMP3DownloaderPlugin 1.0.17 - SDK 10.4 3rd-Party support link
AdobePDFViewerNPAPI: Version: 11.0.03 - SDK 10.6 3rd-Party support link
FlashPlayer-10.6: Version: 12.0.0.70 - SDK 10.6 3rd-Party support link
DivXBrowserPlugin: Version: 2.1 3rd-Party support link
LogMeIn: Version: 1.0.730 3rd-Party support link
Flash Player: Version: 12.0.0.70 - SDK 10.6 3rd-Party support link
iPhotoPhotocast: Version: 7.0 - SDK 10.8
LogMeInSafari32: Version: 1.0.730 3rd-Party support link
QuickTime Plugin: Version: 7.7.3
AdobePDFViewer: Version: 11.0.03 - SDK 10.6 3rd-Party support link
SharePointBrowserPlugin: Version: 14.3.4 - SDK 10.6 3rd-Party support link
Silverlight: Version: 5.1.20125.0 - SDK 10.6 3rd-Party support link
EPPEX Plugin: Version: 3.0.0.0 3rd-Party support link
WidevineMediaTransformer: Version: (null) 3rd-Party support link
JavaAppletPlugin: Version: Java 7 Update 25 Outdated! Update
Safari Extensions:
DivX Plus Web Player HTML5 <video>: Version: 2.1.0.900
Open in Internet Explorer: Version: 1.0
ClickToPlugin: Version: 2.5.3
DivX HiQ: Version: 2.1.0.900
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 1.9 - SDK 10.9
AppleAVBAudio: Version: 2.0.0 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
User Internet Plug-ins:
Move-Media-Player: Version: npmnqmp 071705000010 3rd-Party support link
WebEx64: Version: 1.0 - SDK 10.6 3rd-Party support link
3rd Party Preference Panes:
DivX 3rd-Party support link
Flash Player 3rd-Party support link
Flip4Mac WMV 3rd-Party support link
Growl 3rd-Party support link
Java 3rd-Party support link
Old Applications:
Microsoft Language Register: Version: 14.3.4 - SDK 10.5 3rd-Party support link
/Applications/Microsoft Office 2011/Additional Tools/Microsoft Language Register/Microsoft Language Register.app
/Users/[redacted]/Library/Application Support/WebEx Folder/1326
Cisco WebEx Event Center: Version: 1304.07.2811.0 - SDK 10.5 3rd-Party support link
convertpdf: Version: 1.2 - SDK 10.5 3rd-Party support link
asannotation2: Version: 1206.25.2804.0 - SDK 10.5 3rd-Party support link
Neat ADF Scanner 2008 10_5: Version: 1.0.0.15 - SDK 10.5 3rd-Party support link
/Library/Image Capture/Devices/Neat ADF Scanner 2008 10_5.app
SLLauncher: Version: 1.0 - SDK 10.5 3rd-Party support link
/Library/Application Support/Microsoft/Silverlight/OutOfBrowser/SLLauncher.app
/Users/[redacted]/Library/Application Support/WebEx Folder/1324
convertpdf: Version: 1.2 - SDK 10.5 3rd-Party support link
Cisco WebEx Meeting Center: Version: 1304.23.2811.0 - SDK 10.5 3rd-Party support link
asannotation2: Version: 1206.25.2804.0 - SDK 10.5 3rd-Party support link
atmsupload: Version: 1209.12.2806.0 - SDK 10.5 3rd-Party support link
Amazon MP3 Downloader: Version: INFO_PLIST_VERSION - SDK 10.4 3rd-Party support link
/Applications/Microsoft Office 2011
Microsoft PowerPoint: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Excel: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Outlook: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Word: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Document Connection: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Solver: Version: 1.0 - SDK 10.5 3rd-Party support link
/Applications/Microsoft Office 2011/Office/Add-Ins/Solver.app
/Applications/Microsoft Office 2011/Office
Microsoft Graph: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Database Utility: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Office Reminders: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Upload Center: Version: 14.3.4 - SDK 10.5 3rd-Party support link
My Day: Version: 14.3.4 - SDK 10.5 3rd-Party support link
SyncServicesAgent: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Open XML for Excel: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Alerts Daemon: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Database Daemon: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Chart Converter: Version: 14.3.4 - SDK 10.5 3rd-Party support link
Microsoft Clip Gallery: Version: 14.3.4 - SDK 10.5 3rd-Party support link
/Applications/iWork '09
Microsoft AutoUpdate: Version: 2.3.6 - SDK 10.4 3rd-Party support link
/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app
/Library/Application Support/Microsoft/MERP2.0
Microsoft Error Reporting: Version: 2.2.9 - SDK 10.4 3rd-Party support link
Microsoft Ship Asserts: Version: 1.1.4 - SDK 10.4 3rd-Party support link
/Users/[redacted]/Downloads
Install Spotify 7: Version: 1.0 - SDK 10.5 3rd-Party support link
Install Spotify 3: Version: 1.0 - SDK 10.5 3rd-Party support link
Install Spotify: Version: 1.0 - SDK 10.5 3rd-Party support link
Install Spotify 2: Version: 1.0 - SDK 10.5 3rd-Party support link
Install Spotify 4: Version: 1.0 - SDK 10.5 3rd-Party support link
Install Spotify 5: Version: 1.0 - SDK 10.5 3rd-Party support link
Install Spotify 6: Version: 1.0 - SDK 10.5 3rd-Party support link
Time Machine:
Time Machine not configured!
Top Processes by CPU:
97% Microsoft Outlook
16% Google Chrome
5% WindowServer
3% Finder
2% EtreCheck
Top Processes by Memory:
180 MB Finder
164 MB soffice
156 MB mds_stores
147 MB Google Chrome
131 MB Numbers
Virtual Memory Information:
928 MB Free RAM
2.59 GB Active RAM
1.22 GB Inactive RAM
1.57 GB Wired RAM
31.52 GB Page-ins
1.33 GB Page-outsFollow these instructions to uninstall MacKeeper. They have been tested with the most recent version of MacKeeper (v 2.8). Earlier versions than the one released in 2012 require more extensive work to uninstall all its components.
The effects of having actually used MacKeeper to do anything are a completely different matter. The fastest way to take an exquisitely designed and painstakingly engineered Mac and make it run like a steaming pile of dung is to install and use such ill-conceived "cleaning" or "security" products. This is just one example of a broad category of time- and money-wasters capable of causing damage that can only be rectified by reinstalling OS X, restoring from a backup, or completely erasing your system and rebuilding it from the ground up. Never install such junk on a Mac.
If you used MacKeeper to encrypt any files or folders, use MacKeeper to un-encrypt them first.
Quit the MacKeeper app if it is running.
Open your Applications folder: Using the Finder's Go menu, select Applications.
Drag the MacKeeper icon from your Applications folder (not the Dock) to the Trash.
You will be asked to authenticate (twice):
You do not need to provide a reason for uninstalling it:
Just click the Uninstall MacKeeper button. You will be asked to authenticate again.
After it uninstalls you may empty the Trash and restart your Mac. All that will remain is an inert log file that does nothing but occupy space on your hard disk. -
Close Excel File after getting data from it
Hi!
I have a big vi to make data aquisiton from a spectrometer. I have the aquisition part and the "save to spreeadsheet" part also. Now I want to make a button to open the data from the excel file and show it in a xy chart. I had some problems but now its working except one important thing. After I read the data from the file and have it in the chart, it seems like the file it's not closed cause if I try to open it in excel, it "hangs" the computer. If I stop the vi, there's no problem. What can I do? I saw here in the forum that its not necessary to open or/and close spreedsheet files but i think this problem is because the file it's not "released" or something. Any help would be great.
Here's the part of the vi that reads the file, and the file itself.
Thanks in advanceStrange. I made the attachment. Anyway, here it is:
Attachments:
open data file.vi 17 KB
scan 11h21m17s .xls 44 KB -
How to sync two excel files, the content is the same in both files after edit.
I have two excel files, which are data and edit by multi users, how can I sync the master files to the copy files after edit?
Is this operation required VBA? marco?Hi,
Your request could be done via VBA code. Here are two ideas.
One:
Syncing the data from master file to the copy file without opening copy file. Sample code
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Dim cnn As Object, SQL$, s$
Select Case True
Case Target.Value = ""
s = "null"
Case IsDate(Target.Value)
s = "#" & Target.Value & "#"
Case IsNumeric(Target.Value)
s = Target.Value
Case Else
s = "'" & Target.Value & "'"
End Select
Set cnn = CreateObject("ADODB.Connection")
cnn.Open "provider=microsoft.jet.oledb.4.0;extended properties='excel 8.0;hdr=no';data source=" & ThisWorkbook.Path & "\test folder\Book2.xls"
SQL = "update [Sheet1$" & Target.Address(0, 0) & ":" & Target.Address(0, 0) & "] set f1=" & s
cnn.Execute (SQL)
cnn.Close
Set cnn = Nothing
End Sub
Two:
Saving the master file as copy file before closing. Reference:
https://msdn.microsoft.com/en-us/library/office/ff194765.aspx?f=255&MSPPError=-2147217396
If you have any further question about coding, I recommend you post the question to the MSDN forum for Excel
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
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.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected].
Maybe you are looking for
-
Error in Authorization even after giving Colon authoriztion to users
Dear Experts We have built a query which is having Sum GT function used and also Constant for some characterstics. But when we execute the query the user is getting not authorized message. If i run the query without the SUM GT and Constant RKF and C
-
Windows 8 Problems changing an AD domain password
Hi i have a problem with Windows 8 computers changing passwords on a Domain. I have several Windows 8 clients that when their passwords have expired they are unable to change them and i am having to reset them on a domain controller. If users change
-
Problem with BADI BADI_HU_DIALOG.
I want to display some customer fields in the screen 'Addit. Data' in the Handling Units (transaction vl02n/vl03n). Therefore I use the BADI 'BADI_HU_DIALOG', method DEFINITION_SUBSCREEN. I need the subscreen in the details, so I use the flag 'IF_D
-
Problem in BDC while going back to previous screen in FB60
Dear All, I have a problem in BDC my BDc stops when it tries to go back to previous screen then manually i have to click on the back button then it gets posted. the previous screen recording for FB60 is SAPMSSY0 0120 X
-
Install program from pc-to nokia n9??
hey, when you download a program / game for the Nokia N9 to the data and will then install / add it into the phone, in which folder should you put it? for when you connect the mobile to data will only pictures, movies, media and text folders until