Exporting NULL values to csv
Hi,
I've recently upgraded from CR 8.5 to CR XI.
I have noticed that when exporting to csv, NULL values are no longer between quotes.
So the result may look like:
instead of
How to get these quotes back?
Hi,
This is a known issue and tracked in ADAPT00590921. The Product Group has informed that Itu2019s by design.
Latest version of U2fsepv.dll and X3fsven.dll does not put double-quotes around all fields exported to CSV.
With export DLL versions higher than U2fsepv.dll 10.0.5.59 and X3fsven.dll - 10.0.5.59...date, date/time and null fields do not export with double-quotes...if you use an older export DLL it exports correctly.
This was determined as by design behavior. This ensures all fields are not explicitly treated as strings in a CSV export.
Regards,
Alpana
Similar Messages
-
Column values shift towards left for null values when export to excel
Post Author: pssuresh
CA Forum: Exporting
All,
I have a strange problem when using crystal report 10 export through C# Code. Consider in a row there are 3 columns and i am exporting to excel. ex.Student_id,Student_name,Student_Section. If Student_name values are null, then student_section values get displayed under student_name. There is a column shift towards left when there are null values. If anybody has already faced this problem, please post ur answer.
Note: When i just export to excel directly from crystal report, it works fine. i face problem only when i export through .Net code. I guess it is the problem with some formatting through code. if any body has fix, let me know.
Thanks,
Suresh.P.SPost Author: pssuresh
CA Forum: Exporting
Thanks for your reply. Even i have done the same thing yesterday to solve that problem. But we have nearly 100 of reports and started migrating now. The best solution crystal reports suggest is this.
http://support.businessobjects.com/library/kbase/articles/c2014430.asp
Thanks,
Suresh.P.S -
How to differentiate the EMPTY Records and Null Values in DSO
Hello....how is everyone here?? Ehehehe!
I try to load some data from the flat file which contains some EMPTY data and Null Values for the records. The data type for the InfoObjects of the fields "Quantity" is "number". The sample data from the flat file (CSV) are as below:
Food Quantity
Hamburger - 12
Cheese - 0
Vegetable - (Empty)
When I try to load the above sample data to the DSO, I get the results of the data as follow:
Food Quantity
Hamburger - 12.000
Cheese - 0.000
Vegetable - 0.000
In this case, how can the user differentiate whether the records is contain empty value of null values in DSO? This is kinda of hard to differentiate the both scenarios above. Is there any way to differentiate the scenarios described here?
Thanks alot =)Hi Fluffy,
It depends on the initial values of the data type
The inital values For quantity/Currency/ Numbers it takes spaces as 0
for char it is SPACE
We cannot differeniate between space and null values.
IF you have to force this then define quantity as char and load the data. we will not have units and aggregation in this case.
Hope this helps.
PV -
How to replace NULL values from main table
Dear all,
I like to remove the NULL values from a main table field. Or the question is how to replace any part of the string field in MDM repository main table field.
e.g. I have a middle name field partly the value is NULL in some hundreds of records, I like to replace NULL values with Space
any recommendation.
Regards,
NaeemHi Naeem,
You can try using Workflows for automatically replacing NULLs with any specific value.
What you can do is: Create a workflow and set trigger action as Record Import, Record Create and Record Update. So, that whenever any change will occur in the repository; that workflow will trigger.
Now create an assignment expression for replacing NULLs with any specific value and use that assignment expression in your workflow by using Assign Step in workflow.
For exiting records, you will have to replace NULLs manually using the process given by Preethi else you can export those records in an Excel spreadsheet which have NULLs and then replace all NULLs with any string value and then reimport those records in your MDM repository.
Hope this will solve your problem.
Regards,
Varun
Edited by: Varun Agarwal on Dec 2, 2008 3:12 PM -
Passing null values to the attributes of a CAF operation
Hi,
In CAF I am trying to fetch data through Web Service. For this I need to pass null value for the attributes of the operation.If I set the value to null it gives me missing parameter as the error.
Can anyone tell me how to pass null values to the attributes of a CAF operation?Hi Xavier,
Declare the two variables of type if_wd_contex_node for e.g. lv_node and if_wd_context_element for e.g. lv_element. Now in the first one lets say lv_node get the refrence of dynamically created node like:
lv_node = wd_context->get_child_node('<node name>').
Then get the refrence of element like:
lv_element = lv_node->get_element( ). (You can also pass index as parameter check the method API)
then just set the value of attribute you want like:
lv_element->set_attribute( exporting name = '<attribute name>' value = '<your value>').
Regards,
Neha -
Exporting Shared Variables to csv
When I try and export SV information to csv, LV (2009, DSC) doesn't seem to recognize any variables that are located within virtual folders in the library. Does anyone know a work-around to get that data tabulated short of cycling through the whole library writing values from SharedVariableIO property nodes to file?
Thanks,
Kyle
CLD using LV, DSC 8.5-2009, RT 8.5
Ghoti!muks wrote:
Have you seen this?
Yep. That's the problem. The shared variable library I'm working with contains well over 1000 variables that are organized into a few dozen virtual folders within the library. When I use the Export Variables function you linked to, it doesn't "see" any variables in folders, only those in the library root.
CLD using LV, DSC 8.5-2009, RT 8.5
Ghoti! -
Ssrs 2008 export to excel and csv file
In a ssrs 2008 report, the user will export data to PDF, excel, and CSV files. When the report is exported to excel or csv file, the user wants me to hide some tablixes. Thus can you show me code on how to export the reports to csv or excel file without
and be able to hide a few tablixes?Hi jazz_dog,
According to your description, you want to set the visibility for some tablixes based on the exporting file type. Right?
In Reporting Services 2008, we don't have any parameter to get type of exporting file. So we can only create a parameter and select a type before exporting to a file. Then use conditional expression to control the visibility. It's definitely not a good workaround,
so your goal can't be achieved in Reporting Services 2008. However, for Reporting Service 2008R2 or later version, we have a build-in parameter called Render Format Name, this parameter will display the type of exporting file automatically. So we can make
the judgment in expression based on the value of this parameter.
Reference:
Built-in Globals and Users References (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
I have table in a jsp and an export button. When user clicks on the export button the data in the table should be exported to either text, csv or excel depending on the option user chhoses. Can anyone help me with this? How to export to excel and csv format.
Hi arthur_branham,
I really liked the way you have replied. Can you pleae share the code with me at [email protected] below is my problem...
I had data in XML.I have displayed the data in jsp. Now i need to provide a link "Export to Excel" in jsp which will invokea servlet prepare the excel report and open up directly through a servlet....
I got some help from...http://www.javaworld.com/javaworld/jw-10-2006/jw-1019-xmlexcel.html?page=1...
This is my code in servlet...
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet spreadSheet = wb.createSheet("Users");
spreadSheet.setColumnWidth((short) 0, (short) (256 * 25));
spreadSheet.setColumnWidth((short) 1, (short) (256 * 25));
// Creating Rows
HSSFRow row = spreadSheet.createRow(0);
HSSFCell cell = row.createCell((short) 1);
cell.setCellValue("Year 2005");
cell = row.createCell((short) 2);
cell.setCellValue("Year 2004");
HSSFRow row1 = spreadSheet.createRow(1);
HSSFCellStyle cellStyle = wb.createCellStyle();
cellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
cellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
cellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
cell = row1.createCell((short) 0);
cell.setCellValue("Revenue ($)");
cell = row1.createCell((short) 1);
cell.setCellValue("25656");
cell = row1.createCell((short) 2);
cell.setCellValue("15457");
FileOutputStream output = new FileOutputStream(new File("/tmp/Users.xls"));
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;filename=Users.xls");
ServletOutputStream out = response.getOutputStream();
wb.write(output);
output.flush();
output.close();
forward = null;
In firefox i get the download dialog box but not able to open in from there,i need to save it and then open. In IE i dont get the dialog box instead the excell open inside the browser......Please help me to open a excel sheet onclick on a link "Export to excel" in jsp......
1)If possible help me with the above code.
2)Or else plz sahre you code with me...
Its urgent....
Thanks in advance... -
Apex 3.0: export a report as .csv file without any Enclosed By character?
In Apex "Report Attributes page/Report Export" is possible to define the Enclosed By field.
The default Enclosed By by characters are a double quotation marks (" ").
Is there a way to export the report as .csv file without any Enclosed By character?
Example line format:
a) using default Enclosed By
"value1";"value2";"value3"
b) using ('') as Enclosed By
'value1';'value2';'value3'
c) using blank space as Enclosed By
value1 ; value2 ; value
d) without any Enclosed By character
value1;value2;value3
What can we do in Apex to export a report as .csv file with the line format example d)?
Thanks for your help.Hi,
There is no Out of the box feature in Apex to achieve this functionality. But what you can do is write a page process to generate the CSV that you want.
For this what I will do is on the first page where you press the Button it will call a PL/SQL page process which actually generates the csv. You can keep the existing report only for display purposes. Find the below process which generate the csv that you require.
begin
-- Set the MIME type
owa_util.mime_header( 'application/octet', FALSE );
-- Set the name of the file
htp.p('Content-Disposition: attachment; filename="filename.csv"');
-- Close the HTTP Header
owa_util.http_header_close;
htp.prn('columnHeader1,ColumnHeader2,ColumnHeader3'||chr(13));
-- Loop through all rows
for x in (
Select column1,column2,column3 from table;
loop
-- Print out a portion of a row,
-- separated by commas and ended by a CR
htp.prn(x."column1"||','||x."column2"||','||x."column3"||chr(13));
end loop;
-- Send an error code so that the
-- rest of the HTML does not render
htmldb_application.g_unrecoverable_error := true; --You can leave out this line if you still want to display the existing HTML report.
end;
This will show a download box, so you can download the csv file. The page process should be called before header and the condition should be the button press. -
Webservice returns null values (Flex)
Hi all,
I created a webservice in abap,
(a RFC and a Function Web Service).
It exports a table type and contains data from a Ztable.
When i request it from Flex, it returns rows, but they contain NULL values, why ?
I can request and display bapi webservices that comes with in SapNetweaver trial 7.1 but i cant display my own webservice.
Result like this;
result generated.webservices.ZCUSTOMERS_TT (@2205981)
[inherited]
[0] generated.webservices.ZCUSTOMERS (@2362c91)
CLIENT null
ID null
NAME null
[1] generated.webservices.ZCUSTOMERS (@23a4129)
[2] generated.webservices.ZCUSTOMERS (@23a42e1)
[3] generated.webservices.ZCUSTOMERS (@23a41c9)
it is true that there are 4 rows in table, but all client, id and name is null
why ?thanks for answer but my problem didint solved.
My webservice can return normal values like integer or decimal and i can read it from flex.
but when i try to view tables, i always get null values BUT item count is true :=) i have 4 item in z table and 4 rows returns in array from webservice but NULL values :=).
I can't return structure as well.
result mx.utils.ObjectProxy (@211af29)
DEGER 1
GS_CUSTOMER generated.webservices.ZCUSTOMERS (@22ce719)
CLIENT null
ID null
NAME null
GT_CUSTOMER mx.collections.ArrayCollection (@210cd01)
[inherited]
[0] generated.webservices.ZCUSTOMERS (@22cef61)
CLIENT null
ID null
NAME null
[1] generated.webservices.ZCUSTOMERS (@22ced31)
[2] generated.webservices.ZCUSTOMERS (@22cedd1)
[3] generated.webservices.ZCUSTOMERS (@22cea11)
source Array (@22687e9)
object Object (@22ce8a9)
type null
uid "723117ED-66EC-C93B-9E66-C0FD4F01246C"
ZCUSTOMER_TT generated.webservices.ZCUSTOMERS_TT (@22eb941)
What do you use, when declaring variables ?
Like or type or ref to ? Can it be a problem ?
here is my function export inteface.
http://img241.imageshack.us/img241/9258/screenhunter01jun082052.gif
Edited by: bilen cekic on Jun 8, 2009 8:26 PM -
I have a request to create a Function Module that will be assigned to an Action Box, which when executed will copy long text for Quality Notification tasks. I have the module created and working, but after my code is executed a runtime error happens due to a null value being passed to a method in the SAP program QM07_UPDATE_ACTIONBOX. It looks to me like it is trying to perform some kind of cleanup tasks, and is trying to delete a node tree that does not exist. My code did nothing with any kind of node tree, so I am not sure how to avoid this runtime error. My code works as desired, except for this error that occurs after my code is processed. Any assistance would be greatly appreciated! Below are more details from the error received...
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not caught in procedure "QM07_UPDATE_ACTIONBOX" "(FUNCTION)", nor was it propagated by a RAISING clause. Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated.
The reason for the exception is:
You attempted to use a 'NULL' object reference (points to 'nothing') access a component (variable: "TREE_ACTIONBOX"). An object reference must point to an object (an instance of a class) before it can be used to access components. Either the reference was never set or it was set to 'NULL' using the CLEAR statement.
Information on where terminated
Termination occurred in the ABAP program "SAPLQM07" - in "QM07_UPDATE_ACTIONBOX". The main program was "SAPLIQS0 ".
In the source code you have the termination point in line 39 of the (Include) program "LQM07U12". The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in procedure "QM07_UPDATE_ACTIONBOX" "(FUNCTION)", but it was neither handled locally nor declared in the RAISING clause of its signature.
The procedure is in program "SAPLQM07 "; its source code begins in line 1 of the (Include program "LQM07U12 ".
28 * bei Tree werden Knoten und Items gelöscht bei Table Control wird
29 * nur g_control_tab neu aufgebaut
30 if g_tree = c_x.
31 *---- Löschen der bestehenden Knoten und Items
32
33 * Tabelle der Knotenschlüssel erzeugen
34 loop at g_node_tab into l_node.
35 append l_node-node_key to l_dnodes_tab.
36 endloop.
37
38 * Items
>>>>> call method tree_actionbox->delete_all_items_of_nodes
40 EXPORTING
41 node_key_table = l_dnodes_tab
42 EXCEPTIONS
43 failed = 1
44 cntl_system_error = 2
45 error_in_node_key_table = 3
46 dp_error = 4.Yes, I have searched the notes. I used the keywords suggested in the dump...
If the error occures in a non-modified SAP program, you may be able to find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following keywords:
"OBJECTS_OBJREF_NOT_ASSIGNED" "CX_SY_REF_IS_INITIAL"
"SAPLQM07" or "LQM07U12"
"QM07_UPDATE_ACTIONBOX" -
Goggle export of contacts in csv forma
Hi, I'm looking for some code that could help me in parsing an imported string (via readUTFBytes)of a goggle export of contacts in csv format. I would like to put each contact into a row in an ArrayCollection
I found this code from http://www.sitepoint.com/forums//showthread.php?t=572709# but it doesn't work to good
var properties:Array = new Array();
var headings:Boolean = false;
var carriage:Number = new Number();
var comma:Number = new Number();
var cursor:Number = new Number();
var sub:Number = new Number();
var item:Object = new Object();
var value:String = new String();
var line:String = new String();
var contacts:Array = new Array();
var result:String = file.data.readUTF();
while( result.indexOf( "\n", cursor ) != -1 ) {
carriage = result.indexOf( "\n", cursor );
line = result.substring( cursor, carriage );
cursor = 0;
sub = 0;
item = new Object();
while( line.indexOf( ",", cursor ) != -1 ) {
comma = line.indexOf( ",", cursor );
value = line.substring( cursor, comma );
if( !headings ) {
properties.push( value );
} else {
item[properties[sub]] = value;
//trace("email:\n" + value.toString());
cursor = comma + 1;
sub++;
value = line.substring( cursor, line.length - 1 );
if( !headings ) {
properties.push( value );
headings = true;
//trace("headings:\n" + value.toString());
} else {
item[properties[sub]] = value;
contacts.push( item );
//trace("contact:\n" + item.Name.toString()); -
Exporting Cystal Reports into CSV format
Hi,
I wanted to export some reports in CSV format with following options checked in Crystal 2008:
These options are given under separated Values exports options:
1. Mode = Standard Mode
2. Isolate Report/Page sections and Isolate Group Scctions check boxes checked
I could not find properties in CR object to set as per above requirement in VB6 code.
I am searching these properties in ReportObj.ExportOptions
Can anyone please advise in this regard.
Thanks in advance.
Regards-
BhoopendraHi Bhoopendra,
The Report Designer Component (RDC) COM component has been retired with the release of CR2008. Using CR2008 in VB6 is not supported, and it's not expected to work.
The recommended upgrade path is to migrate to the Crystal Reports .NET SDK. You can find getting started information in the [.NET Development - Crystal Reports|SAP Crystal Reports, version for Visual Studio; forum.
Sincerely,
Dan Kelleher -
Hi all,
As per below coding in my application need to export each column data to excel. total column of my table is 10.
Normally , the 5th column usually is null value and other
column is not null.
the question is below coding can't loop 6-10th column due to 5th column is null value then break.
everybody can tell me how to cause pl/sql can loop 6-10th column even 5th column is null ?
FOR k IN 1..10
LOOP
IF NOT NAME_IN(:system.cursor_item) IS NULL THEN
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_IMP_TYPE' THEN
IF NAME_IN(:system.cursor_item) = 'EI' THEN list_index := 1;
ELSIF NAME_IN(:system.cursor_item) = 'LI' THEN
list_index := 2;
ELSE
list_index := 3;
END IF;
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', GET_LIST_ELEMENT_LABEL('TSCNTRMOV.TS_IMP_TYPE',list_index));
ELSIF GET_ITEM_PROPERTY(:system.cursor_item,DATATYPE) = 'DATE' THEN
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_TRANS_DATE' THEN
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR HH24:MI:SS'));
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR'));
END IF;
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', name_in(:system.cursor_item));
END IF ;
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
next_item;
END IF;
END LOOP;
best regards
borisHi Gerd,
tks for yr remind.
i have another one question. can u help me ?
my trigger is use for export data to excel from data block. i feel it process slow too. because it is a one by one column/row insert.
how to enchance the performance from coding ?
i know that use table type in trigger for store a heap of data then insert to excel once. but i don't know how to implement. can u tell me how to do that .
tks a lot.
pls see below trigger is one by one insert.
PROCEDURE EXPORT_EXCEL IS
app CLIENT_OLE2.OBJ_TYPE;
workbooks CLIENT_OLE2.OBJ_TYPE;
workbook CLIENT_OLE2.OBJ_TYPE;
worksheets CLIENT_OLE2.OBJ_TYPE;
worksheet CLIENT_OLE2.OBJ_TYPE;
args CLIENT_OLE2.LIST_TYPE;
cell CLIENT_OLE2.OBJ_TYPE;
font CLIENT_OLE2.OBJ_TYPE;
patterns CLIENT_OLE2.OBJ_TYPE;
j INTEGER;
k INTEGER;
file_name_cl VARCHAR2(32767);
item_prompt VARCHAR2(32767);
fir_item VARCHAR2(80);
cur_item VARCHAR2(80);
list_index NUMBER (1);
user_cancel EXCEPTION;
BEGIN
-- create a new document
app := CLIENT_OLE2.CREATE_OBJ('Excel.Application');
CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
workbooks := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Workbooks');
workbook := CLIENT_OLE2.INVOKE_OBJ(workbooks, 'add');
worksheets := CLIENT_OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
worksheet := CLIENT_OLE2.Invoke_OBJ(worksheets, 'Add');
go_block('TSCNTRMOV_HB');
j:=2; /* Represents row number */
k:=1; /* Represemts column number */
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell:=CLIENT_OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', 'Container Movement Report');
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '18');
CLIENT_OLE2.SET_PROPERTY (font, 'Bold', True);
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
/* Add the column headings using item prompts */
j:=4 ;
fir_item := Get_Block_Property ( :SYSTEM.CURRENT_BLOCK, FIRST_ITEM );
WHILE ( fir_item IS NOT NULL ) LOOP
cur_item := :SYSTEM.CURRENT_BLOCK || '.' || fir_item ;
item_prompt := GET_ITEM_PROPERTY(cur_item, label);
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
patterns := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'INTERIOR') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', item_prompt);
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY(patterns, 'ColorIndex', '6');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.SET_PROPERTY (font, 'Bold', True);
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
fir_item := GET_ITEM_PROPERTY( cur_item, NEXTITEM ) ;
k := k + 1 ;
END LOOP;
go_block('TSCNTRMOV');
first_record ;
j:=5; /* Represents row number */
k:=1; /* Represemts column number */
LOOP
--FOR k IN 1..38
--LOOP
WHILE (GET_ITEM_PROPERTY(:system.cursor_item,VISIBLE) <> 'TRUE') LOOP
IF NAME_IN(:system.cursor_item) IS NOT NULL THEN
-- WHILE (NAME_IN(:system.cursor_item) IS NOT NULL) LOOP
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_IMP_TYPE' THEN
IF NAME_IN(:system.cursor_item) = 'EI' THEN
list_index := 1;
ELSIF NAME_IN(:system.cursor_item) = 'LI' THEN
list_index := 2;
ELSE
list_index := 3;
END IF;
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', GET_LIST_ELEMENT_LABEL('TSCNTRMOV.TS_IMP_TYPE',list_index));
ELSIF GET_ITEM_PROPERTY(:system.cursor_item,DATATYPE) = 'DATE' THEN
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_TRANS_DATE' THEN
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR HH24:MI:SS'));
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR'));
END IF;
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', name_in(:system.cursor_item));
END IF ;
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
END IF;
NEXT_ITEM;
k := k + 1 ;
END LOOP;
j:=j+1;
k:=1;
IF :system.last_record = 'TRUE' THEN
exit;
ELSE
next_record;
END IF;
END LOOP;
--CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
CLIENT_OLE2.RELEASE_OBJ(worksheet);
CLIENT_OLE2.RELEASE_OBJ(worksheets);
/* release workbook */
CLIENT_OLE2.RELEASE_OBJ(workbook);
CLIENT_OLE2.RELEASE_OBJ(workbooks);
/* Release application */
CLIENT_OLE2.RELEASE_OBJ(app);
EXCEPTION
WHEN user_cancel THEN
RAISE;
END; -
1.5.1: Excel import - Problem with NULL values in date fileds
Hi,
I'm trying to import Excel Data via CSV with the import into table feature of SQLDeveloper.
Everything works fine, but if I select some of my date colums I get an error telling me that I have null or invalid values in a date column:
Verifying if the Date columns have date formats
FAILED
Date columns SOA_CONTROLLING_NO, SOA_DATE_OF_CONTROLLING, PAYOUT_ME_2_SUM, PAYOUT_ME_1_SUM, PAYOUT_PLUS_SUM, PAYOUT_6_SUM, PAYOUT_5_SUM, PAYOUT_4_SUM, PAYOUT_3_SUM, PAYOUT_2_SUM, PAYOUT_1_SUM, CONTRACT_APPENDIX_SUM, CONTRACT_BASE_SUM, ME_CONVENANT_SUM, REF_SUM_NO_REPAY, SEL_CONVENANT_SUM, ME_REQ_SUM, REF_REQ_SUM_NO_REPAY, SEL_REQ_SUM, have invalid or null date formats
I tried:
+20012121313,demo1,,+
+20012121313,demo1,NULL,+
+20012121313,demo1,to_date(NULL),+
but none of them worked...
How may I import those columns, where some of the rows contain NULL values?
Same story using 1.5... ;-(
Thank you!
Best regards,
JohannLook at the query Andy proposed:
SELECT NULL LINK, start_date, NVL(sum_of_trans, 0) + 0.001 VALUE
FROM (SELECT TRUNC (startdate) start_date,
CASE
WHEN :p9_view_by = 1
THEN ROUND (DURATION / 60, 3)
ELSE 1
END sum_of_trans
FROM TRANSACTION
WHERE trans_id = x AND startdate BETWEEN y AND z
GROUP BY TRUNC (startdate)) xDoes this query deliver anything?
Denes Kubicek
Maybe you are looking for
-
FM to create Sales order with reference to another Sales order
Hi, Is there any inbound IDOC FM which can create a Sales Order with reference to another Sales order. PLease reply Santhana M.
-
Flex 3.5 and Flash Player 10 -- text disappears?
Hello, I have an interesting problem. I have been developing a client app for the last year or so with Flex 3.5, compiled against a minimum version of Flash Player 9 in Flex Builder. It's a Facebook app. Then I needed to move it to the web, use the F
-
Mark confirmation warning as error at plant level
Hi, Its a business requirement that when carrying out confirmation of production orders, over and underdelivery tolerance as specified in material master should be enforced. This can be done using transaction OPK4, selecting the plant and order type
-
XI-BW Integration using RFC adapter?/
How to update bw ods using rfc adapter
-
Hello can anyone explain me how to solve this scenario.
Hello Experts, Today i have attended an interview .. the interviewer has given me this scenario and gave me a system and asked me to solve this scenario practically.. So this is the scenario.. How to solve can any one send me some idea and if possibl