Problem while writing data on xls file using jxl API
Hi,
I am getting problem while writing data on excel file using jxl api.
When i write data on file and all handles associated to the file are closed, file size increases but when i open the file nothing is written in it and when file is closed manually from excel window, file size decreased to its original that was before writing data.
here is code:
FileOutputStream os = new FileOutputStream(this.dirPath + this.fileName, true);
WritableWorkbook this.workbook = Workbook.createWorkbook(os);
after writing data following handler are closed:
this.os.flush();
this.workbook.write();
this.workbook.close();
this.os.close();
this.os = null;
can any body help me.
Thanks in advance
Err, I did help you. I did understand your problem; and I solved it for you. What was missing was that you apparently made no effort to understand what you were being told. Or even consider it. You just argued about it, as though you were the one with the solution, instead of the one whose code didn't work.
And the other thing that was missing was the part where you said 'thank you' to me for solving your problem. Somewhat more appropriate than biting the hand that fed you, frankly. I do this for nothing, on my own gas, and it's extremely irritating when people keep asking about problems I have already solved for them. I am entitled to discourage that. It's part of making them more efficient actually.
But it happens often enough that it also makes me think I'm just wasting my time. Probably I am.
Similar Messages
-
Problem while downloading data to text file using GUI_DOWNLOAD FM
Hi,
When we download the data using the GUI_DOWNLOAD FM into the text file tab delimeted(table is built dynamically),
Its coming in this format as shown below
Field1 Fileld2 Field3
1 2 3
However I want it in this way
Field1 Fileld2 Field3
1 2 3
Could someone please let me know how to achieve this?Do something like this:
concatenate field1 field2 field3 into lv_outx "(data of sufficient length, type c)
separated by gc_tab. "Horizontal tab constant created as note above
condense lv_outx no-gaps. "squeeze out extraneous spaces but beware if you have text with spaces...drop the no-gaps.
append lv_outx to my_internal_table. "table with a single field type char, sufficient length
open dataset datasetname...
loop at my_internal_table into ls_internaltabstructure.
transfer internaltabstructure-outx to datasetName [length if needed].
endloop. -
Export Chinise data in XLS file using toad
Hii..
I have one table which have chinise data
All data is correct .
I am exporting chinese data from Oracle table,I am facing problem
I export data through toad in flat file
and import it in XLS file using UTF character set .
After importing all character gets converted to ???? marks.
I cant see the data properly in the XLS file .
my guess data base is not exporting file as unicode and hence charactger gets converted
How I export data which I show correct data in chinise?Hi
I am using 8.5 version of toad .I tried with sql developer also but no vail..
can I set like this
ALTER SESSION SET NLS_LANGUAGE='SIMPLIFIED CHINESE';
ALTER SESSION SET NLS_TERRITORY='CHINA';
ALTER SESSION SET NLS_CHARACTER_SET='AMERICAN_AMERICA.UTF8';
and my NLS_LANG in windows for 10g client is AMERICAN_AMERICA.WE8MSWIN1252
PLz suggest mi
My NLS_SESSION_PARAMETERS in database are as follows
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE -
Data convertion while exporting data into flat files using export wizard in ssis
Hi ,
while exporting data to flat file through export wizard the source table is having NVARCHAR types.
could you please help me on how to do the data convertion while using the export wizard?
Thanks.Hi Avs sai,
By default, the columns in the destination flat file will be non-Unicode columns, e.g. the data type of the columns will be DT_STR. If you want to keep the original DT_WSTR data type of the input column when outputting to the destination file, you can check
the Unicode option on the “Choose a Destination” page of the SQL Server Import and Export Wizard. Then, on the “Configure Flat File Destination” page, you can click the Edit Mappings…“ button to check the data types. Please see the screenshot:
Regards,
Mike Yin
TechNet Community Support -
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 -
Problem while uploading data from flat file
hi friends,
suppose if there are 100 records in flat file , if 20 records uploaded with out any problem and if error occurs while uploading remaing data . is necessary to upload entire data again or else only remaining data should be uploaded?
i had used call transaction for purchase order application?
please give me reply soon its urgent
thanks & regards
priyaHi Hari,
you have to upload the remaining data.
as u have used CT method, do 1 thing trap the error data in runtime & prepare another flat file. next time correct the data in new flat file. & run the DBC program again with this new flat file.
Reward if useful
Regards
ANUPAM -
Problem in writing into the excel file using java code
Hai ,
I will be getting the data as a string and i am writing into the excel file. the problem is .if it has numeric values even now i will writing as a string data ,at this time i am getting the message in the excel file as "Number in the cell is formatted as text".
I need to remove this thru my code..but i can write only as a string .
To write in a excel file ,i used HSSFWorkbook.just check out
http://www.andykhan.com/ -
Facing problem in writing data to excel sheet using ActiveX
Hi.
I want to write data from a one dimesional array to a particular excel sheet in a particular row.Please see the attached vi for explantion.
It is giving error.But If I give a new file name when the appliation is getting closed it is writing data to the new excel file.
Please help.
Thanks in advance
Attachments:
Excel sheetWrite.vi 90 KBThanks Jhoskin and Rudi .......
I am able to write data to excel sheet now. I am attaching one"test.zip" file that contains a VI named "Squence.vi "that contains another subVI named "Write U94006 Table To XL.vi"which does the functionality of counting the number of rows in the excel sheet and writing data in the next blank row. I am using the same subVI in the VI named "Sequence.vi"two times so it is taking a lot of time in opening and closing the excel sheet. Will you please suggest some way of calling the subVI only one time.
Rikki
Attachments:
Test.zip 105 KB -
Writing Data to a file using TEXT_IO in Forms
I have a situtation where i have 5 columns and having arabic as well as english data. when i want to write this data to a txt file using TEXT_IO in a specific format, it writes to a file but as soon as it finds an arabic field, it changes the posistion. how can i write to a txt file in the posistion i want???
vaishnavinatarajan wrote:
How to write data to a file without leaving any blank lines in the file? How to check if the cursor is placed in the corner of a notepad file using LAB VIEW?
If you write data to a file, simply don't include any blank lines. We cannot give more specific advice unless you are telling us how you are writing. Are you writing to a new file or appending to an existing file. If the blank lines already exist, you need to read the entire file, remove the undesired lines from the string, and write the data back.
Notepad files don't have any "corners". Please describe what you are trying to do.
What is "LAB VIEW"?
LabVIEW Champion . Do more with less code and in less time . -
Problem in writing data to flat file
Hi,
I have created an interface with table as source and file as target. My interface is running from long time but its not writing data into file. Any clue?
-ChikkHi,
Please, take a look if the target file is locked.
Try to delete it and put the "Truncate" option from IKM to yes.
Cezar -
Problem while applying configuration to SCE 8000 using SCE-API
We are facing an issue while applying service configuration to SCE 8000 device using SCE API supplied by CISCO.
We have sample .pqb file which we are using to upload to SCE 8000. We are using 3.5.5 version of firmware on SCE.
Attached is exception file which contains sample .pqb and trace log that we see when we apply configuration. Please note, that we are using RHEL5 platform, JDK 1.5.0_1 and standalone java program to apply configuration on SCE using API
com.pcube.management.common.InvocationException: null ### java.lang.NullPointerException java.lang.NullPointerException
at com.pcube.management.framework.fsmanager.RFileInputStream.close(RFileInputStream.java:240)
at java.io.BufferedInputStream.close(BufferedInputStream.java:440)
at com.pcube.apps.engage.management.Utilities.copyDeviceToLocalRMI(Utilities.java:357)
at com.pcube.apps.engage.policy.ConfigurationRetriever.retrievePolicy(ConfigurationRetriever.java:85)
at com.pcube.apps.engage.policy.Test.fetchPpUpgradeVersion(Test.java:15)
at com.elitecore.pm.SCEConfiguration.main(SCEConfiguration.java:460)
com.pcube.management.common.InvocationException: null ### java.lang.NullPointerException java.lang.NullPointerException
failed to fetch current pp upgrade version listjava.lang.NullPointerException0.0.0 PP0com.pcube.apps.engage.common.ApplyException: Client version 3.5.5 PP20 is different than SCE version 0.0.0 PP0, therefore apply is not allowed
at com.pcube.apps.engage.policy.SEPolicyMediator.checkPpVersion(SEPolicyMediator.java:335)
at com.pcube.apps.engage.policy.SEPolicyMediator.applyPolicy(SEPolicyMediator.java:114)
at com.pcube.apps.engage.policy.SEPolicyMediator.applyPolicy(SEPolicyMediator.java:95)
at com.elitecore.pm.SCEConfiguration.main(SCEConfiguration.java:461)
com.pcube.management.common.InvocationException: null ### java.lang.NullPointerException java.lang.NullPointerException
at com.pcube.management.framework.fsmanager.RFileInputStream.close(RFileInputStream.java:240)
at java.io.BufferedInputStream.close(BufferedInputStream.java:440)
at com.pcube.apps.engage.management.Utilities.copyDeviceToLocalRMI(Utilities.java:357)
at com.pcube.apps.engage.policy.ConfigurationRetriever.retrievePolicy(ConfigurationRetriever.java:85)
at com.pcube.apps.engage.policy.Test.fetchPpUpgradeVersion(Test.java:15)
at com.elitecore.pm.SCEConfiguration.main(SCEConfiguration.java:460)
com.pcube.apps.engage.common.ApplyException: Client version 3.5.5 PP20 is different than SCE version 0.0.0 PP0, therefore apply is not allowed
at com.pcube.apps.engage.policy.SEPolicyMediator.checkPpVersion(SEPolicyMediator.java:335)
at com.pcube.apps.engage.policy.SEPolicyMediator.applyPolicy(SEPolicyMediator.java:114)
at com.pcube.apps.engage.policy.SEPolicyMediator.applyPolicy(SEPolicyMediator.java:95)
at com.elitecore.pm.SCEConfiguration.main(SCEConfiguration.java:461)You are likely hitting CSCtb94072.
The policy file should be manipulated by development engineer.
Please open a case with TAC and ask the CSE to fix the policy (by getting development engineer assistance).
Once you have the fixed policy PQB file perform the following CLI procedure on all SCEs on which the problem was observed:
SCE2000>enable
Password:
SCE2000#cd engage
SCE2000#delete MYENGAGE.PQB
SCE2000#rename MYENGAG1.PQB MYENGAGE.PQB
SCE2000#
Once done you should be able to apply the fixed policy without any issue.
Note: after performing the above CLI procedure, you can also successfully retrieve the policy,
however, you must avoid doing it since the retrieved poilcy would not be the last applied one, it would be the penultimate one which you probably don't want to use.
After applying the fixed policy, you should be able to retrieve policy successfully with no fear.
====
This is more of a clarification regarding the workaround procedure:
To get you better understand the issue.
The last policy applied to the SCE successfully is kept under the SCE "/engage" directory by the name MYENGAGE.PQB
The penultimate applied policy is also kept there under the name MYENGAG1.PQB
When the SCA-BB GUI applies a policy it first verifies the matching SCA-BB and PP version by inspecting this MYENGAGE.PQB file.
If the file has the corruption dealt in this defect, the apply will fail with the message of the kind:
"Client version 3.5.5 PP18 is different than SCE version 0.0.0 PP0, therefore apply is not allowed"
The MYENGAG1.PQB is the penultimate applied policy and it's not corrupted, renaming it MYENGAGE.PQB will assure us that the apply operation won't fail when verifying the versions are matched.
Alternatively (for the renaming procedure) user may copy the fixed policy file into the SCE disk space under /engage directory and name it MYENGAGE.PQB, then the apply should also work fine. -
Sound problem while transimission over the network by using JMF API
i had done an application which transmit audio and video over the network by using JMF API in JAVA. All my application work very well but i have a problem with the sound while i transmit it. this sound has a very bad quality (i am using AVReceive2.java) .
has anyone an indication or solution for my problem
it's very urgent, please help me.
regards
saryou can try modifing de Capture example from JMF Solutions.
change this function:
public int startCapture() {
int result = -1;
enableComponents(false);
buttonStart.setLabel("Pause");
buttonEnd.setEnabled(true);
startMonitoring();
try {
processor.start();
DataSource clone = Manager.createCloneableDataSource(datasource);
MediaLocator ml2 = new MediaLocator("file://capture.mov");
System.out.println("Content Type " + clone.getContentType());
datasink = Manager.createDataSink(processor.getDataOutput(), ml2);
datasink.open();
datasink.addDataSinkListener(this);
datasink.start();
result = 0;
} catch (Exception e) {
System.err.println("DataSink Exception " + e);
result= -1;
Regards.
Fernando -
Writing to a xml file using DOM API
Hi,
I try to write some elements in an existing xml file.
Document doc = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = null;
try
builder = factory.newDocumentBuilder();
doc = builder.parse("c:/WUTEMP/rules.xml");
Element rules = doc.getDocumentElement();
Element eRule = doc.createElement("rule");
rules.appendChild(eRule);
Element ruleSyntax = doc.createElement("rule-syntax");
eRule.appendChild(ruleSyntax);
ruleSyntax.appendChild(doc.createTextNode(syntax));
It runs without errors but the xml file isn't changed. Some ideas ?
Structure of xml file:
<rules>
</rules>
And executing code above must resulting in :
<rules>
<rule-syntax> </rule-syntax>
</rules>
But nothing happens with the file.Code below did the trick:
Transformer xformer = TransformerFactory.newInstance().newTransformer();
DOMSource source = new DOMSource(doc);
StreamResult result = new StreamResult(new File("c:/WUTEMP/rules.xml"));
xformer.transform(source, result); -
Problem in writing data to excel spread sheet using jdbc
Hi Friend,
I have written a jdbc application ,that retrives data from oracle8i database and writes to excel spread sheet.
Here I am facing a problem while writing date vales to the spread sheet.
It is just writing 00.00.0 , instead of a date like 21/10/2005, where I am going wrong , can any one guide me.
Thanks in advance.Don't cross-post!
http://forum.java.sun.com/thread.jspa?threadID=643815&tstart=0
Especially when you already got your answer in the other post jackass. If you don't understand the answer then say so there. -
Problem while writing to fixed length flat file from xml
Hi,
I have a problem in writing data into a flat file of fixed length...
My input is a xml file and i want the output as a flat file. I am successful in converting the xml into flat file... But the main problem is, i am unable to insert spaces in between my fields in the flat file.
The data in the flat file comes without spaces... Any suggestions on writing the schema...
Regards
Surya.Have a look at this doc
http://otndnld.oracle.co.jp/document/products/as10g/101310/doc_cd/integrate.1013/b28994/nfb.htm#BGBBAJFD
your element should be something like this, it pads with a space using the paddedBy expression
<xsd:element name="C1" type="xsd:string" nxsd:style="fixedLength" nxsd:length="4" nxsd:paddedBy=" " nxsd:padStyle="tail" />if having trouble post what you want the file to look like, and the xsd you are using.
cheers
James
Maybe you are looking for
-
Downloaded the App Sales Call Manager. I can't get it to work on either my Iphone 4s or my Ipad2? Can anybody advise how to fix or even get back my money that i paid for it?
-
Using a session object to hold the value of a record set?
Hi, I'm trying to hold the value of a record set (or literally the content of a column in a query in a db) in a session variable so that I can call on this later and insert into another table. I'm not sure of the correct syntax, I've already made a c
-
Hi friends, While, i was developing code for quizgo.php, as part of online quiz/test application, i am facing following problems along-with the checklist to be succeeded:- Objective: Show each question one-by-one from query results (first 30 recorded
-
H/W: SPA3000 F/W: 3.1.20(GW) Problem: The last digit repetition within the dial plan is not working for gateway 0-4. Line 1 Dial Plan: (****|<#,xx.<:@gw1>|1747xxxxxxxx.<:@gw1>) Dial "17474743246#" which works for gw1. Dial "#17474743246" which also w
-
Accordion Widget - custom sizing
Is it possible when using the accordion widget to have the lable the same size as my thumbnail/image, and then for it to enlarge when selected? If not is there any other kind of widget that is similar to this? Even if it's an add-on.. Thanks.