Procedure o/p in the excel file
Hi,
Oracle9i
Written a batch script which calls the oracle procedure.
But, want the o/p of the procedure in the excel file columnwise with the column headings ?
How it can be done ?
Regards
Here's one of my standard examples that takes a query and generates a CSV file:
As sys user:
CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
/As myuser:
CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
,p_dir IN VARCHAR2
,p_header_file IN VARCHAR2
,p_data_file IN VARCHAR2 := NULL) IS
v_finaltxt VARCHAR2(4000);
v_v_val VARCHAR2(4000);
v_n_val NUMBER;
v_d_val DATE;
v_ret NUMBER;
c NUMBER;
d NUMBER;
col_cnt INTEGER;
f BOOLEAN;
rec_tab DBMS_SQL.DESC_TAB;
col_num NUMBER;
v_fh UTL_FILE.FILE_TYPE;
v_samefile BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
BEGIN
c := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
d := DBMS_SQL.EXECUTE(c);
DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
ELSE
DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
END CASE;
END LOOP;
-- This part outputs the HEADER
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
FOR j in 1..col_cnt
LOOP
v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
IF NOT v_samefile THEN
UTL_FILE.FCLOSE(v_fh);
END IF;
-- This part outputs the DATA
IF NOT v_samefile THEN
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
END IF;
LOOP
v_ret := DBMS_SQL.FETCH_ROWS(c);
EXIT WHEN v_ret = 0;
v_finaltxt := NULL;
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
ELSE
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
END CASE;
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
END LOOP;
UTL_FILE.FCLOSE(v_fh);
DBMS_SQL.CLOSE_CURSOR(c);
END;This allows for the header row and the data to be written to seperate files if required.
e.g.
SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
PL/SQL procedure successfully completed.Output.txt file contains:
empno,ename,job,mgr,hiredate,sal,comm,deptno
7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
Adapt to output different datatypes and styles are required.
Similar Messages
-
After I Update to IOS 7.1 I can't open the excel file attached in my email
After I updated my Iphone 5s from IOS7.0.6 to IOS7.1 when i check my email i can't open excel file attached in my email i check with my frineds phone thy have same issoue
David_PDX wrote:
Hi Alex,
The trick to this whole thing is to scroll to the bottom of the message. There should be a dashed line at the bottom of the email message with text underneath it that says, "This message was downloaded as plain text." Underneath that it should say (in blue hyperlink text) "Download full message". Select that hyperlink, and the Excel file should download completely. You should then be able to select the document and have it open correctly.
I have had the same concern regardless of file format that is sent, so I do not believe your issue is with file format. Hope this helps.
I've seen the same thing happen with images, which it displays in a corrupted form. It's fixed by downloading the full message.
There's a more serious side effect of this, which I've now seen with several types of files. If one FORWARDS the email to someone else, the attached files it sends them are CORRUPTED and unopenable too. In the case of a Word files I looked at, it had dropped the last two bytes of the file.
The workaround for that is to download the full message before forwarding.
I'm seeing this happening with so many types of attachments that I'm assuming it affects them all. Please everyone report this to Apple feedback (http://www.apple.com/feedback/). It's one thing not being able to open a file on your device, it's another to have files corrupted permanently just by forwarding. -
How to read data from the excel file using java code.
Hi to all,
I am using below code to getting the data from the excel file but I can't get the corresponding data from the specific file. can anyone give me the correct code to do that... I will waiting for your usefull reply......
advance thanks....
import java.io.*;
import java.sql.*;
public class sample{
public static void main(String[] args){
Connection connection = null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection( "jdbc:odbc:Mydsn","","" );
Statement st = con.createStatement();
ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );
System.out.println("sample:"+rs);
ResultSetMetaData rsmd = rs.getMetaData();
System.out.println("samplersd:"+rsmd);
int numberOfColumns = rsmd.getColumnCount();
System.out.println("numberOfColumns:"+numberOfColumns);
while (rs.next()) {
System.out.println("sample1:"+rs);
for (int i = 1; i <= numberOfColumns; i++) {
if (i > 1) System.out.print(", ");
String columnValue = rs.getString(i);
System.out.print(columnValue);
System.out.println("");
st.close();
con.close();
} catch(Exception ex) {
System.err.print("Exception: ");
System.err.println(ex.getMessage());
}1: What is the name of the excel sheet?
2: What is printed in this program? null ? anything?
error?Excel file name is "sample.xls" I set excel file connectivity in my JDBC driver(DSN). Here in my program I am not giving that excel file name. I am giving only that excel sheet name. that is followed
ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );The output of this program is given bellow.
sample:sun.jdbc.odbc.JdbcOdbcResultSet@1b67f74
samplersd:sun.jdbc.odbc.JdbcOdbcResultSetMetaData@530daa
numberOfColumns:2 -
Problem in reading the excel file path in WINDOWs machine from UNIX environ
Hello friends,
My requirement is to read each row of the excel sheet and sent that row to the database. I have implemented it by using jxl and apache poi framework. locally in my WINDOWS machine it is working fine..
But when i deploy the code in UNIX machine. My application runs on a Unix server , trying to read the excel file in WINDOWS environment. I am not able to retrieve the file path. for ex : C:\Documents and Settings\sabbanik\My Documents\KARUNAKAR\excel.xls
I am getting error in this line
workbook = Workbook.getWorkbook(filepath)
Error message : input file not found.
Thanks in advance..You said: I am getting error in this line workbook = Workbook.getWorkbook(filepath) >
Based on this, I will assume you are trying to use OLE to access information about the Excel file. As mentioned by Andreas, your code will be executing on the server (Unix) and since Excel isn't on the server (and cannot be) an error will result. OLE can only be used in Windows environments (client or server). To access client side OLE calls and content, you need a java bean and Excel installed on the client machine. Oracle provides WebUtil as an option to writing your own Java Bean. To use this, you will need to be running Forms 10.1.2 or newer. Details can be found here along with a demo:
http://www.oracle.com/technetwork/developer-tools/forms/webutil-090641.htm -
Need to generate the excel file with diffrent sheets using utl_file package
Hi,
Sorry for previous message in which I had missed the usage of " UTL_FILE " package
I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files using
" UTL_File " package and my requirement is to generate this in a single excel file with diffrent sheets.
Please help on this
Thanks & Regards,
Krishna VyavahareHello 10866107,
at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the packages behind second and fourth link support more than one worksheet.
Regards
Marcus -
Problem while opening the excel files
Hi
In my system , i have excel reports in my server disk . And i am opening the excel files through an action class like /viewReport.do?id=23 .....and thus from the action class i open my excel file .
After opening one excel file , i try to open another excel by clicking that link , then my system often hangs else excel shows an error saying "a report with name viewReport.do is already open " even though both of these files are different on the server
How can i avoid this ??
The reason why i am opening the excel file through an action class is , i need to perform some operations before opening that excel report
i tried by setting the
response.setHeader("Content-disposition","attachment; filename=myWorksheet.xls");
and i kept on changing the names but that doesnt work
Can any one let me know how to go abt this ??Hi Sir,
I found you posted the issue in the
APS.NET forum, and you seems use some code to open the file. Have you tried the last link in the thread?
Then, let's do some test to narrow down the issue.
I notice that you are using Office 2010, does the issue occur only with 'Reachlocal.xlsx' or every existed file?
If every Excel file has the issue, please try the following methods:
Open the file in
safe mode.
Repair Office 2010.
On the other hand, this problem might be caused by malware on the affected machine. There are now two known variants of malware which causes this problem: Win32/Crilock.A and
Win32/Buma!rts. They have both been identified as a new family of
ransomware.
http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2013/09/07/quot-cannot-open-the-file-because-the-file-format-or-extension-is-invalid-quot-opening-office-files.aspx
If you have any further assistance about code/program, I recommend you post the question to MSDN forum:
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
Regards,
George Zhao
TechNet Community Support -
Password Protection to the Excel File that was down loaded
Hi Friends,
I had an requirement regarding the excel file.whenever the excel file is down loaded on the desktop it should be password protected.i..e, no one should be able to open the file unless they have the password.REPORT ZWMI_TRUCK_DOWNLOAD no standard page heading.
======================================================================
Program Name : ZWMI_TRUCK_DOWNLOAD *
Description : This Program is used to get all truck load status *
and download into XLS File and fields are Route #, *
Dispatch time ,Closing time ,Scan Details. *
Author : Seshu *
Date : 02/15/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
02/15/07| Seshu | DEVK922058 | Initial *
02/20/07| Seshu | DEVK922068 | Changed the name as per Naming *
Convention *
03/14/07| Seshu | DEVK922126 | Included date as Range *
======================================================================
Tables
tables : zsdcarton,
ztruck,
ztruckstatus.
Constants
constants: c_werks(4) type c value '1000'.
Internal table for Ztruck
data : begin of i_ztruck occurs 0,
werks like ztruck-werks," Plant
vdatu like ztruck-vdatu, " Delivery date
ZZTRKNO like ztruck-ZZTRKNO, " Route #
ZZSHIPTIME like ztruck-ZZSHIPTIME, " Dispatch time
ZCLTIME like ztruck-ZCLTIME, " Truck close time
end of i_ztruck.
Internal table for ZSDCARTON
data : begin of i_zsdcarton occurs 0,
lateflag like zsdcarton-lateflag,
zzslot like zsdcarton-zzslot,
status like zsdcarton-status,
end of i_zsdcarton.
Internal table for Final output
data : begin of i_final occurs 0,
vdatu like ztruck-vdatu, " Delivery Date
ZZTRKNO like ztruck-ZZTRKNO, " Route #
ZZSHIPTIME like ztruck-ZZSHIPTIME, " Dispatch time
ZCLTIME like ztruck-ZCLTIME, " Truck close time
load_compl_c(5) type n , " Load Complted Time
status_s_total(5) type n, " No Scan/Load
status_l_total(5) type n, " Late Scan
end of i_final.
Internal Table XLS File Header
DATA: BEGIN OF i_head OCCURS 0,
field(30) TYPE c,
END OF i_head.
Variables
status couter
data: status_total(5) type n,
no scan / no load
status_s(3) type n,
status_s_total(5) type n,
good
status_g(3) type n,
status_g_total(5) type n,
late
status_l(3) type n,
status_l_total(5) type n,
manual
status_m(3) type n,
status_m_total(5) type n,
alternative
status_a(3) type n,
status_a_total(5) type n.
S E L E C T I O N - S C R E E N *************************
selection-screen : begin of block blk with frame title text-001.
select-options : p_vdatu for zsdcarton-vdatu obligatory
default sy-datum.
selection-screen : end of block blk .
S T A R T - O F - S E L E C T I O N ******************
start-of-selection.
Get the data from ZTRUCK and
perform get_data_tables.
Down load the data into XLS file
perform get_download.
S T A R T - O F - S E L E C T I O N ******************
end-of-selection.
*& Form get_data_tables
FORM get_data_tables.
data : lv_time like sy-uzeit.
select werks
vdatu
zztrkno
zzshiptime
zcltime from ztruck into table i_ztruck
where werks = c_werks
and vdatu in p_vdatu.
if sy-subrc ne 0.
message e000(zwave) with 'No data found for given current date'.
endif.
loop at i_ztruck.
refresh : i_zsdcarton.
clear : i_zsdcarton,
lv_time.
Get the Scan Status for Every route
select lateflag zzslot status from zsdcarton into table i_zsdcarton
where werks = i_ztruck-werks
and vdatu = i_ztruck-vdatu
and zztrkno = i_ztruck-zztrkno.
if sy-subrc eq 0.
loop at i_zsdcarton.
case i_zsdcarton-lateflag.
late cartons
when 'X'.
late and never loaded
if i_zsdcarton-zzslot = space.
add 1 to status_s.
else.
add 1 to status_l.
endif.
all other exceptions
when space.
check if scanned
case i_zsdcarton-zzslot.
good scan
when 'S'.
add 1 to status_g.
never scanned
when space.
if i_zsdcarton-status = space.
no scan
add 1 to status_s.
else.
no load -> no scan
add 1 to status_s.
endif.
manual scanned
when 'M'.
if i_zsdcarton-status = 'M'.
add 1 to status_g.
elseif i_zsdcarton-status = 'E'.
exceprtion -> manual
add 1 to status_g.
endif.
endcase.
endcase.
add totals
add status_g to status_g_total.
Late Scan
add status_l to status_l_total.
add status_a to status_a_total.
No Scan and Load
add status_s to status_s_total.
clear : status_g,
status_l,
status_a,
status_s.
endloop.
else.
continue.
endif.
Get the Load Complete Time
select single uzeit from ztruckstatus into lv_time
where werks = i_ztruck-werks
and lgnum = '100'
and vdatu = i_ztruck-vdatu
and zztrkno = i_ztruck-zztrkno
and tstat = 'L'.
if sy-subrc eq 0.
write: lv_time(5)
to i_final-load_compl_c using edit mask '__:__'.
endif.
Delivery Date
i_final-vdatu = i_ztruck-vdatu.
Route #
i_final-zztrkno = i_ztruck-zztrkno.
Dispach time
i_final-zzshiptime = i_ztruck-zzshiptime.
Truck Close Time
i_final-zcltime = i_ztruck-zcltime.
No Scan/ Load
i_final-status_s_total = status_s_total .
Late Scan
i_final-status_l_total = status_l_total.
append i_final.
clear : status_g_total,
status_l_total,
status_a_total,
status_s_total,
lv_time,
i_final.
endloop.
ENDFORM. " get_data_tables
*& Form get_download
Download the data
FORM get_download.
data : lv_file like rlgrap-filename,
lv_date(8) type c.
lv_date = sy-datum.
concatenate 'C:/Truckload' lv_date into lv_file.
Fill the Header Values
Delivery Date
i_head-field = 'Delivery Date'.
append i_head.
Route #
i_head-field = 'Route'.
APPEND i_head.
Dispatch Time
i_head-field = 'Dispatch Time'.
append i_head.
Closing Time
i_head-field = 'Closing Time'.
append i_head.
Load Completed Time
i_head-field = 'Load Completed Time'.
append i_head.
No Scan/Load
i_head-field = 'No Scan/Load'.
append i_head.
Late Scan
i_head-field = 'Late Scan'.
append i_head.
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = lv_file
CREATE_PIVOT = 0
DATA_SHEET_NAME = 'TruckLoad'
PIVOT_SHEET_NAME = ' '
PASSWORD = ' '
PASSWORD_OPTION = 0
TABLES
PIVOT_FIELD_TAB =
DATA_TAB = i_final
FIELDNAMES = i_head
EXCEPTIONS
FILE_NOT_EXIST = 1
FILENAME_EXPECTED = 2
COMMUNICATION_ERROR = 3
OLE_OBJECT_METHOD_ERROR = 4
OLE_OBJECT_PROPERTY_ERROR = 5
INVALID_FILENAME = 6
INVALID_PIVOT_FIELDS = 7
DOWNLOAD_PROBLEM = 8
OTHERS = 9
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " get_download
In function module you have option like password protect.. -
How to get the EXCEL file from web site (b2b) into SAP system?
Hi Guys,
I have a requirement of saving the excel file that has been send to SAP system from a B2B site.
Currently there is a call to the SAP system from the B2B site via an RFC function ,this RFC functions gets the excel file as an input to the SAP system,i need to store this Excel file in the SAP (as an excel file itself).
How can i acheive this?
Please suggest.
Thanks ,
SwatiYou can extract a date portion and assign to the variable and then compare with GETDATE()
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Time Stamp problem while writing data into the excel file
Hii, All
I am taking the data from the DAQ card of the TOPSCCC with the 8 ms of scanrate for each channel and there are total 16 no of Analog channels in the Card, now i am acquiring the data from the card, time stamping it and writing it into the excel file, which is tab delimited, now the problem is, the data which are in the excel file have the same timestamp for 4 to 5 continuous records, instead we want each data with the different and continuous time stamp with same difference of time stamp between two records, mean if it is difference of 8 ms then it should be the 8 ms for all, but here it is taking the differnce of 16 ms for two samples and giving same time stamp for four to five records and that shouldn't happen, here i am attaching my vi, drivers for the cards and Excel file with the data, can you please give me any suggestion how to do it?
Please help me i require this suggestion as early as possible, i am requiring it urgently.
Thanks in Advance,
Nishant
Attachments:
2026vi.llb 319 KB
2026_ScanMultAD_Demo_time.vi 80 KB
Data.xls 357 KBHello Nishant,
that's what I meant:
Message Edited by GerdW on 05-16-2006 10:32 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
timestamp-array.png 2 KB -
To set a dropdown list for one column in the excel file before downloading
Hi all,
I am downloading an excel file which has the format of an internal table with a number of fields. I want to set a dropdown list for one column in the excel file. How can i do this?
ThanksHI ,
U can use function module " QINT_GET_EXCEL_DATA " ....
and modify the excel sheet based on ur requirement ......
Try this ...
Hope it works
Thanks
Shambhu -
How do read the data of the excel file line by line to the waveform?
hello:
i am a beginner.so i hope that you can give me a small example。the data of the excel file i
have given out.
looking for your replys!!!
Solved!
Go to Solution.
Attachments:
数据.xls 14 KBtry this. best of luck
Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Attachments:
Read column.zip 26 KB -
How to preform the auto extraction of the Excel file in Import Manager
Hi Experts,
I was performing an automatic import using the Import Manager.
In the port, i defined the map name, file type and the automatic execution. But the import manager could not perform the mapping correctly after i putted the Excel file into the ready folder. And the error message in the exception log was "MS Excel is not supported on x64 platform." But when I imported the file in import manager manually, nothing wrong was happend duing this processing.
How could I perform a correctly mapping in the Import Manager.Hi Wendrin,
This is a limitation . The MDIS on 64-bit Windows cannot import from Excel . However manual imports are supported (as this doesnt need MDIS).
XML is the best suited format for automating imports in MDM. Suggest you switch over to xml and setup auto import.
Regards,
Vinay M.S -
I get my emails sent to my Ipad 1 and when I try to open the excel files, they come up in a sort of word doc. how can I get them to come over on excel
I was still typing my first post while you had already responded.
Maybe I am taking your last post the wrong way but reread your post. If I am taking it the wrong way - please accept my apology in advance.
lisaadele123 wrote:
I get my emails sent to my Ipad 1 and when I try to open the excel files, they come up in a sort of word doc. how can I get them to come over on excel
Where do you state that you need to email the files to someone else?
Where do you state that you need to edit them?
This was my response ....
You can't edit any of these files without a compatible iPad app like Documents to Go (Excel, Word) or Pages (Word files).
You can open and view the files as mail attachments but you will not be able to edit them. Explain exactly what you are doing and maybe you can get meaningful instructions.
Basically I said the same thing as Julian and I thought that maybe if you explained EXACTLY what you were trying to do, it would be helpful.
Sorry for not being a mind reader. Your second post ...
I thought I had already explained, I get excel spreadsheets emailed to me I need to open them, read them, edit them and send them on to another person,
That is not what you asked the first time around.
Message was edited by: Demo -
Upload the excel file in oracle db through oracle forms
Hi all,
I want to upload the excel file in oracle db through oracle forms...I am new to oracle forms .
I have searched a lot but not getting exact solution
Is there anyone who will help me out with this .....
Any help will be appriciatedI'm trying to move data from excel into an Oracle forms field. This involves coping 2 columns of data cells in excel and pasting it into an Oracle forms field. I can get the date pasted into the Oracle forms field but there is a invisible character that separates the 2 columns of data coming from Excel. I do not know what this character is but it is causing the error 'Line 1 is invalid. Check forms'.
Any ideas how to get pass this?
Thank you -
Stuck - load the Excel file dynamically with different columns and worksheet names
I have a situation where I want to load the Excel file dynamically, and the excel file have different columns or even worksheet name. Any idea how I could
approach this? I believe there's no way to modify the meta data (specifically the mapping) in the data flow.Hi Chimumu,
The SSIS stock adapters don't supporting dynamic column mapping, to achieve your goal, you need to use Script Task/Component to read the Excel sheet name and the columns in the worksheet, and then map to the output columns of the script component. You can
also refer to the following blogs:
http://micktechblog.blogspot.com/2011/06/ssis-excel-import-with-unknown-number.html
http://wikiprogrammer.wordpress.com/2011/04/08/dynamic-column-mapping-in-ssis-part-1/
Regards,
Mike Yin
TechNet Community Support
Maybe you are looking for
-
Email Account Problems after iOS 5.0.1 update on iPad 2 &; iPhone 4
After finishing the iOS 5.0.1 update - I have noticed none of my email accounts are working (i.e. Error saying Incorrent Password or Username). I have deleted the associated accounts and added them once again, verifying both username and passwords as
-
Hi there. I'm afraid i know very little about the workings of a mac other than swapping drives, ram etc. I was made redundant a week ago and part of my severance was a 3.0QX tower... I have been leant an SSD drive running 10.6.8 which I know was work
-
Just downloaded the trial version....downloaded fine but when trying to launch, a prompt came up saying could not open as computer did not meet minimum operating requirements...but it does. I'm running Vista with sufficient processing speed, RAM and
-
Why is the file size increasing when cropping in Photoshop CC?
While cropping a picture the file size is increasing dramatically. An image 7360 X 4912 px (Image size : 103,4M) after cropping to 60 X 40 cm 300 px, goes up to an image of 18000 X 12000 px (Image size : 618,0 M). And the computer is unable to cope w
-
No multiperson capabnilities on my MBP???
I just purchsed 3 new Macs for our small business (yeah, it's like Christmas for a Mac geek like me!). We have an iMac , a MacBook Pro and a Macbook. The MBP won't multiperson video. Meaning it doesn't show a layered icon in it's buddy list. I'm test