Write jTable data into a file
Hi All ,
I am preparing a Java Swing GUI , In this i have a jTable . Whenever a user writes data into that jTable , the written data should fall in a file .Please tell me the code how to write this jTable data into a file .
Any help will be highly appreciated.
Thanks,
Rajesh
Don't do that. Why would you want to rewrite the entire file (since you can't really selectively edit it) if just storing (maybe serializing) the table's data model when the application is exiting or an explicit saving is requested by the user would be enough?
Similar Messages
-
Java.io.NotSerializableException when overwrite the JTable data into .txt file
hi everyone
this is my first time to get help from sun forums
i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
I hope i can get any solution at here and this will be very useful for me.
the following is my code...some of it i create it with the GUI netbean
but i dunno how to attach my .txt file with this forum
did anyone need the .txt file?
this is the code that suspect maybe some error here
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String filename = "studio1.txt";
try {
FileOutputStream fos = new FileOutputStream(new File(filename));
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(jTable2);
oos.close();
catch(IOException e) {
System.out.println("Problem creating table file: " + e);
return;
System.out.println("JTable correctly saved to file " + filename);
}the full code will be at the next msgthis is the part 1 of the code
this is the full code...i had /*....*/ some of it to make it easier for reading
package gui;
import javax.swing.*;
import java.io.*;
public class timetables extends javax.swing.JFrame {
public timetables() {
initComponents();
@SuppressWarnings("unchecked")
private void initComponents() {
jDialog1 = new javax.swing.JDialog();
buttonGroup1 = new javax.swing.ButtonGroup();
buttonGroup2 = new javax.swing.ButtonGroup();
buttonGroup3 = new javax.swing.ButtonGroup();
buttonGroup4 = new javax.swing.ButtonGroup();
jTextField1 = new javax.swing.JTextField();
jLayeredPane1 = new javax.swing.JLayeredPane();
jLabel6 = new javax.swing.JLabel();
jTabbedPane1 = new javax.swing.JTabbedPane();
jScrollPane3 = new javax.swing.JScrollPane();
jTable2 = new javax.swing.JTable();
jScrollPane4 = new javax.swing.JScrollPane();
jTable3 = new javax.swing.JTable();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
/* org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
jDialog1.getContentPane().setLayout(jDialog1Layout);
jDialog1Layout.setHorizontalGroup(
jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 400, Short.MAX_VALUE)
jDialog1Layout.setVerticalGroup(
jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 300, Short.MAX_VALUE)
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
String filename1 = "studio1.txt";
try {
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
jTable2 = (JTable) ois.readObject();
System.out.println("reading for " + filename1);
catch(Exception e) {
System.out.println("Problem reading back table from file: " + filename1);
return;
try {
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
jTable3 = (JTable) ois.readObject();
System.out.println("reading for " + filename1);
catch(Exception e) {
System.out.println("Problem reading back table from file: " + filename1);
return;
jTable2.setRowHeight(20);
jTable3.setRowHeight(20);
jScrollPane3.setViewportView(jTable2);
jScrollPane4.setViewportView(jTable3);
jTable2.getColumnModel().getColumn(4).setResizable(false);
jTable3.getColumnModel().getColumn(4).setResizable(false);
jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
jTextField1.setText("again n again");
jLabel6.setText("jLabel5");
jLabel6.setBounds(0, 0, -1, -1);
jButton2.setText("jButton2");
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
-
Write the data into a file in 10 ms interval within 10 sec
Hi,
I'm trying to write the data into a file when I press a OK button and the data should write in a file every 10ms interval. After pressing the OK button the process will stop after 10 sec.
I've attached my VI.
Problem is that I'm getting the result every ms. How can I get the data every 10ms? So it'll come 1000 data within 10 sec.
For other calculations purpose I'm using Amplitude and Level Measurements block to get the mean DC voltage, so when I change the Samples to Read and Rates, the process is getting stuck.
Any kind of suggestion is appreciable.
Thanks,
Chotan
Attachments:
DAQ_Time_Checking_For10s_02.vi 131 KBSee example attached, if needed
Nghtcwrlr
********************Kudos are alwayzz Welcome !! ******************
Attachments:
Example.vi 36 KB -
Can I select when do i want to write my data into a file?
What I want is like,
When I click a button as ON then only it goes an writes the data into a spreadsheet.
Now i have made the bolllean so that it will show TRUE when you have to write...but if FALSE nothing should happen...
and I cant see any option in Write to Spread Sheet function for it..
So can you help me out with what should I do
Solved!
Go to Solution.You put the Write to Spreadsheet file in a case structure.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours -
How to create a procedure in oracle to write the data into file
Hi All,
I am just wondered on how to create a procedure which will do following tasks:
1. Concat the field names
2. Union all the particular fields
3. Convert the date field into IST
4. Prepare the statement
5. write the data into a file
Basically what I am trying to achieve is to convert one mysql proc to oracle. MySQL Proc is as follows:
DELIMITER $$
USE `jioworld`$$
DROP PROCEDURE IF EXISTS `usersReport`$$
CREATE DEFINER=`root`@`%` PROCEDURE `usersReport`(IN pathFile VARCHAR(255),IN startDate TIMESTAMP,IN endDate TIMESTAMP )
BEGIN
SET @a= CONCAT("(SELECT 'User ID','Account ID','Gender','Birthdate','Account Registered On') UNION ALL (SELECT IFNULL(a.riluid,''),IFNULL(a.rilaccountid,''),IFNULL(a.gender,''),IFNULL(a.birthdate,''),IFNULL(CONVERT_TZ(a.creationDate,'+0:00','+5:30'),'') INTO OUTFILE '",pathFile,"' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' FROM account_ a where a.creationDate>='",startDate,"' and a.creationdate <='",endDate,"')");
PREPARE stmt FROM @a;
EXECUTE stmt;
DEALLOCATE PREPARE stmt ;
END$$
DELIMITER ;
Regards,
Vishal G1. Concat the field names
Double Pipe (||) is the concatenation operator in Oracle. There is also a function CONCAT for this purpose
2. Union all the particular fields
Not sure what do you mean by UNION ALL particular fields? UNION ALL is a set operation applied on two different result sets that have the same projection.
3. Convert the date field into IST
SQL> select systimestamp "Default Time"
2 , systimestamp at time zone 'Asia/Calcutta' "IST Time"
3 from dual;
Default Time IST Time
05-05-15 03:14:52.346099 AM -04:00 05-05-15 12:44:52.346099 PM ASIA/CALCUTTA
4. Prepare the statement
What do you mean by prepare the statement?
5. write the data into a file
You can use the API UTL_FILE to write to a file. -
How to writing the data into the file at the same frequency of data acquisition using myRIO
Hi everyone,
I have a question regarding data acquisition fequency and data recording frequency of myRIO. Hope you guys can help me out.
Basically, I want to acquire voltage input at analog input 0 at the frequency of 1kHz and then write the data into a file (tdms format).
However, I always found there were only 55 or 56 data points recorded every second in the data file (see the excel sheet).
To confirm my data acquisition was performed at the correct frequency, I added a small function in the main loop to indicate the time spent between two acquisition events.
To my surprise, the period of data acquistion is correct (1ms or 1kHz) but there are only 55 or 56 data point per second recorded in the data file.
How can I record every data point acquired by the analog input?
Thank you!
P.S. I am very new to myRIO. How can I manually set the system time for myRIO? The default time of my myRIO is wrong.
Best,
Tengyang
Attachments:
test result.xlsx 16 KB
Main with timed loop.vi 122 KB
test result.xlsx 16 KBHave a look at the Jakarta POI project, they have a Java API for creating Word documents.
http://jakarta.apache.org/poi/hwpf/index.html -
Java.io.NotSerializableException when overwrite the JTable data into .txt
hi everyone
i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
At the beginning, the code will be generate successfully and the jtable
will be showing out with the data that been save in the studio1.txt
previously,
but after i edit the data at the JTable, and when i trying to click the
save button, the error had been showing out and i cannot succeed to
save the JTable with the latest data.
After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
I hope i can get any solution at here and this will be very useful for me.
but i dunno how to attach my .txt file with this forum
did anyone need the .txt file?
the following is my suspect code
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String filename1 = "studio1.txt";
try {
FileOutputStream fos = new FileOutputStream(new File(filename1));
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(jTable2.getModel());
oos.flush();
oos.close();
fos.close();
catch(IOException e) {
System.out.println("Problem creating table file: " + e);
e.printStackTrace();
return;
System.out.println("JTable correctly saved to file " + filename1);
}this is the reading code
String filename1="studio1.txt";
try {
ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
TableModel model = (TableModel)ois.readObject();
jTable3.setModel(model);
System.out.println("reading for " + filename1);
catch(Exception e) {
System.out.println("Problem reading back table from file: " + filename1);
return;
}Edited by: Taufulou on Jan 8, 2009 11:43 PM
Edited by: Taufulou on Jan 8, 2009 11:44 PM
Edited by: Taufulou on Jan 8, 2009 11:45 PMis this the code u mean?
i had put this code inside it but the problem still remain the same
if (jTable2.isEditing()) {
jTable2.getCellEditor().stopCellEditing();
}i had found a new thing that when i just double click the cell without change any data inside the table
and click the button "Save". the same exception which is
java.io.NotSerializableException: java.lang.reflect.Constructor
will come out again. -
Unable to write data into excel file when it's close
Hi,
I'm facing this problem and it's a bit weird. I'm using the following method to insert data into excel file. But when excel file is close, it unable to write data into the excel sheet. But it was able to write the data into the excel sheet if i open the excel file when running the program.
Can anyone please tell me what's wrong to the code?
public int updateLog(String sheet, String no, String cpId, String CatId, String rbtCode, String rbt, String rbtName, String artistName, String price, String rbtFileName, String songId, String msg){
int result = -1;
try{
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ENGLISH);
String actionDate = formatter.format(new Date());
rbtName = rbtName.replaceAll("'", "''");
artistName = artistName.replaceAll("'", "");
String sql = "insert into [Sheet3$] (Code, CpID, CategoryID, RBTCode, RBT, RBTName, ArtistName, Price, RBTFileName, SongID, UploadStatus, FileUploadedDateTime) ";
sql = sql + " values ('" + no + "', '" + cpId + "', '" + CatId + "', '" + rbtCode + "', '" + rbt + "', '" + rbtName + "', '" + artistName + "', '" + price + "', '" + rbtFileName + "', '" + songId + "', '" + msg + "', '" + actionDate + "')";
System.out.println(sql);
log.writeLog(sql);
result = stmnt.executeUpdate(sql);
} catch(Exception e){
e.printStackTrace();
log.printStackTrace(e);
return result;
public int openConnection(){
int result = -1;
try{
Class.forName(dbDriver);
c = DriverManager.getConnection(conStr + excelFilePath+";ReadOnly=0;");
stmnt = c.createStatement();
} catch(Exception e){
e.printStackTrace();
log.printStackTrace(e);
return -1;
return 1;
}ThanksHI,
i hv a doubt regarding reading / opening of a
password protected Excel file using jxl( java ) .
How to read / open a password protected Excel file
thro Java (jxl ) program .plz let me know some
example also .
Regards,
Ramesh P
845935822cross posting !! answered here
http://forum.java.sun.com/thread.jspa?threadID=710466&messageID=9507085#9507085 -
Problem in converting table data into CSV file
Hi All,
In my Process i need to convert my error table data into csv file,my data is converted as csv file by using OdisqlUnload function,but the column headers are not converted,i use another procedure for converting column headers but iam getting below error ...
com.sunopsis.sql.SnpsMissingParametersException: Missing parameter string.find, string.find
SQL: import string import java.sql as sql import java.lang as lang import re sourceConnection = odiRef.getJDBCConnection("SRC") output_write=open('C:/Oracle/Middleware/Oracle_ODI2/oracledi/pro/PRO.txt','r+') myStmt = sourceConnection.createStatement() my_query = "select * FROM E$_LOCAL_F0911Z1" my_query=my_query.upper() if string.find(my_query, '*') > 0: myRs = myStmt.executeQuery(my_query) md=myRs.getMetaData() collect=[] i=1 while (i <= md.getColumnCount()): collect.append(md.getColumnName(i)) i += 1 header=','.join(map(string.strip, collect)) elif string.find(my_query,'||') > 0: header = my_query[7:string.find(my_query, 'FROM')].replace("||','||",',') else: header = my_query[7:string.find(my_query, 'FROM')] print header old=output_write.read() output_write.seek(0) output_write.write (header+'\n'+old) sourceConnection.close() output_write.close()
And i used below code for converting.......
import string
import java.sql as sql
import java.lang as lang
import re
sourceConnection = odiRef.getJDBCConnection("SRC")
output_write=open('C:/Oracle/Middleware/Oracle_ODI2/oracledi/pro/PRO.txt','r+')
myStmt = sourceConnection.createStatement()
my_query = "select FROM E$_COMPANY"*
*my_query=my_query.upper()*
*if string.find(my_query, '*') > 0:*
*myRs = myStmt.executeQuery(my_query)*
*md=myRs.getMetaData()*
*collect=[]*
*i=1*
*while (i <= md.getColumnCount()):*
*collect.append(md.getColumnName(i))*
*i += 1*
*header=','.join(map(string.strip, collect))*
*elif string.find(my_query,'||') > 0:*
*header = my_query[7:string.find(my_query, 'FROM')].replace("||','||",',')*
*else:*
*header = my_query[7:string.find(my_query, 'FROM')]*
*print header*
*old=output_write.read()*
*output_write.seek(0)*
*output_write.write (header+'\n'+old)*
*sourceConnection.close()*
*output_write.close()*
Any one can you help regarding this
Edited by: 30021986 on Oct 1, 2012 6:04 PMThis may not be an option for you but in pinch you may want to consider outputing your data to an MS Spreadsheet, then saving it as a CSV. It's somewhat of a cumbersome process, but it will get you by for now.
You will need to change your content type to application/vnd.ms-excel.
<% response.setContentType("application/vnd.ms-excel"); %> -
Error while writing the data into the file . can u please help in this.
The following error i am getting while writing the data into the file.
<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="code">
<code>null</code>
</part>
<part name="summary">
<summary>file:/C:/oracle/OraBPELPM_1/integration/orabpel/domains/default/tmp/
.bpel_MainDispatchProcess_1.0.jar/IntermediateOutputFile.wsdl
[ Write_ptt::Write(Root-Element) ] - WSIF JCA Execute of operation
'Write' failed due to: Error in opening
file for writing. Cannot open file:
C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\
BPEL_Import_with_Dynamic_Transformation\WORKDIRS\SampleImportProcess1\input for writing. ;
nested exception is: ORABPEL-11058 Error in opening file for writing.
Cannot open file: C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\
BPEL_Import_with_Dynamic_Transformation
\WORKDIRS\SampleImportProcess1\input for writing. Please ensure 1.
Specified output Dir has write permission 2.
Output filename has not exceeded the max chararters allowed by the
OS and 3. Local File System has enough space
.</summary>
</part>
<part name="detail">
<detail>null</detail>
</part>
</bindingFault>Hi there,
Have you verified the suggestions in the error message?
Cannot open file: C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\BPEL_Import_with_Dynamic_Transformation\WORKDIRS\SampleImportProcess1\input for writing.
Please ensure
1. Specified output Dir has write permission
2. Output filename has not exceeded the max chararters allowed by the OS and
3. Local File System has enough space
I am also curious why you are writing to a directory with the name "..\SampleImportProcess1\input" ? -
Append data into the file in application server
Hi Friends,
I have an issue where i have a job which has three different stepst for same program. If i run the job the program will create a file in the application server and append the other two steps in the same file without overwriting the file or creating a new file.
My problem is like its creating three different files in application server for that particular job since it has three steps . Its not appending into one particular file .
I am using the FM 'Z_INTERFACE_FILE_WRITE' where i have used the pi_append in the exportng parameter . ITs working when i specify the file in local system. It is appending correctly when i run the report normally to apppend into local system.
But when i schedule a job to append the file in application server its creating three different files.
Kindly help me if anyone is aware of this issue
Thanks in advance
KishoreHi,
Please use open dataset to write and append files.Please check the logic of Z FM which you are using .
To open and write into a file use
OPEN DATASET FNAME FOR OUTPUT.
To append data into existing file use
OPEN DATASET FNAME FOR APPENDING.
To write into file:
v_file = file path on application server
OPEN DATASET v_file FOR output.
IF sy-subrc NE 0.
write:/ 'error opening file'.
ELSE.
TRANSFER data TO v_file.
ENDIF.
CLOSE DATASET v_file.
For appending :
OPEN DATASET v_file fOR APPENDING.(file is opened for appending data position is set to the end of the file).
Thanks and Regards,
P.Bharadwaj -
Media Encoder "Could not write XMP data in output file." issue
Greetings,
We have invested a great deal of money and time into a brand new editting system and we need some help with adobe media encoder. We are trying to export some of our projects and we keep getting the same error. Here is the entire log of errors:
Could not write XMP data in output file.
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_6.prproj
- Output File: M:\acura_rooftop_43_draft_1.avi
- Preset Used: NTSC DV
- Video: 720x480, 29.97 [fps], Lower, Quality 100
- Audio: 48000 Hz, Stereo, 16 bit
- Bitrate:
- Encoding Time: 00:17:23
2/4/2010 1:42:28 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_7.prproj
- Output File: C:\Users\Ramius\Desktop\acura_rooftop_43draft_1.avi
- Preset Used: NTSC DV
- Video: 720x480, 29.97 [fps], Lower, Quality 100
- Audio: 48000 Hz, Stereo, 16 bit
- Bitrate:
- Encoding Time: 00:02:09
2/4/2010 1:54:21 PM : Encoding Failed
The Operation was interrupted by user
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_9.prproj
- Output File: C:\Users\Ramius\Desktop\acura_rooftop_43draft_1.avi
- Preset Used: NTSC DV
- Video: 720x480, 29.97 [fps], Lower, Quality 100
- Audio: 48000 Hz, Stereo, 16 bit
- Bitrate:
- Encoding Time: 00:16:04
2/4/2010 2:19:49 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_10.prproj
- Output File: C:\Users\Ramius\Desktop\acura_rooftop_HD_draft_1.mp4
- Preset Used: HDTV 1080p 29.97 High Quality
- Video: NTSC, 1920x1080, 29.97 [fps], Progressive
- Audio: AAC, 160 [kbps], 48 kHz, Stereo
- Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
- Encoding Time: 00:01:38
2/4/2010 2:30:31 PM : Encoding Failed
The Operation was interrupted by user
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_11.prproj
- Output File: C:\Users\Ramius\Desktop\acura_HD.mp4
- Preset Used: HDTV 1080p 29.97 High Quality
- Video: NTSC, 1920x1080, 29.97 [fps], Progressive
- Audio: AAC, 160 [kbps], 48 kHz, Stereo
- Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
- Encoding Time: 00:00:38
2/4/2010 3:19:31 PM : Encoding Failed
The Operation was interrupted by user
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_12.prproj
- Output File: C:\Users\Ramius\Desktop\acura_HD.avi
- Preset Used: NTSC DV
- Video: 720x480, 29.97 [fps], Lower, Quality 100
- Audio: 48000 Hz, Stereo, 16 bit
- Bitrate:
- Encoding Time: 00:01:08
2/4/2010 3:31:37 PM : Encoding Failed
The Operation was interrupted by user
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_17.prproj
- Output File: C:\Users\Ramius\Desktop\acura_HD.avi
- Preset Used: NTSC DV
- Video: 720x480, 29.97 [fps], Lower, Quality 100
- Audio: 48000 Hz, Stereo, 16 bit
- Bitrate:
- Encoding Time: 00:15:31
2/4/2010 4:21:06 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\Acura Spot 011410_CS4_1_19.prproj
- Output File: M:\GRAPHICS\cow_graphics\acura_HD.mp4
- Preset Used: HDTV 1080p 29.97 High Quality
- Video: NTSC, 1920x1080, 29.97 [fps], Progressive
- Audio: AAC, 160 [kbps], 48 kHz, Stereo
- Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
- Encoding Time: 00:00:24
2/4/2010 5:16:54 PM : Encoding Failed
The Operation was interrupted by user
- Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_16.prproj
- Output File: C:\Users\Ramius\Desktop\mxf.mpg
- Preset Used: 1440 x 1080i 29.97 High Quality
- Video: NTSC, 1440x1080, 29.97 drop frame [fps], Upper, Quality 4.0
- Audio: 384 [kbps], 48 kHz, 16 bit, Stereo, MPEG
- Bitrate: VBR, 1 Pass, Min 4.00, Target 15.00, Max 18.50 [Mbps]
- Encoding Time: 00:05:08
2/23/2010 12:12:40 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_18.prproj
- Output File: M:\AVI\ihigh_avi\GAR\Marines\marinespromo_2009.avi
- Preset Used: NTSC DV
- Video: 720x480, 29.97 [fps], Lower, Quality 100
- Audio: 48000 Hz, Stereo, 16 bit
- Bitrate:
- Encoding Time: 00:04:00
2/23/2010 12:26:54 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_19.prproj
- Output File: M:\AVI\ihigh_avi\GAR\Marines\marinespromo_2009.avi
- Preset Used: NTSC DV
- Video: 720x480, 29.97 [fps], Lower, Quality 100
- Audio: 48000 Hz, Stereo, 16 bit
- Bitrate:
- Encoding Time: 00:05:08
2/23/2010 12:51:01 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_23.prproj
- Output File: C:\Users\Ramius\Desktop\allhdtest2.mpg
- Preset Used: 1440 x 1080i 29.97 High Quality
- Video: NTSC, 1440x1080, 29.97 drop frame [fps], Upper, Quality 4.0
- Audio: 384 [kbps], 48 kHz, 16 bit, Stereo, MPEG
- Bitrate: VBR, 1 Pass, Min 4.00, Target 15.00, Max 18.50 [Mbps]
- Encoding Time: 00:04:20
2/23/2010 4:23:46 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_27.prproj
- Output File: C:\Users\Ramius\Desktop\Sequence 07.mp4
- Preset Used: HDTV 1080p 29.97 High Quality
- Video: NTSC, 1920x1080, 29.97 [fps], Progressive
- Audio: AAC, 160 [kbps], 48 kHz, Stereo
- Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
- Encoding Time: 00:09:11
3/2/2010 3:21:19 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_28.prproj
- Output File: C:\Users\Ramius\Desktop\Sequence 07_1.mp4
- Preset Used: HDTV 1080p 29.97 High Quality
- Video: NTSC, 1920x1080, 29.97 [fps], Progressive
- Audio: AAC, 160 [kbps], 48 kHz, Stereo
- Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
- Encoding Time: 00:09:00
3/2/2010 3:34:47 PM : Encoding Failed
Error compiling movie.
Unknown error.
- Source File: C:\Users\Ramius\AppData\Local\Temp\ihigh_CS4_HD_29.prproj
- Output File: C:\Users\Ramius\Desktop\Sequence 07_2.mp4
- Preset Used: HDTV 1080p 29.97 High Quality
- Video: NTSC, 1920x1080, 29.97 [fps], Progressive
- Audio: AAC, 160 [kbps], 48 kHz, Stereo
- Bitrate: VBR, 1 Pass, Target 32.00, Max 40.00 [Mbps]
- Encoding Time: 00:10:22
3/2/2010 4:41:03 PM : Encoding Failed
Error compiling movie.
Unknown error.
We absolutely need to fix this issue ASAP, we are in a major bind until we can resolve this issue. Thanks a bunch.We are using Windows 7
dual quadcore intel xeon processors 8gb ram
10000rpm internal drives. quadroefx 1800 video card
The drive is 4tb
We have tried exporting to many different locations with no luck
Its a very nice video editting system. We just need to figure out this exporter -
How to write xml data to a file
Hi all,
We have a requirement of writing the xml data into a file in given directory in the server. Generating the xml data using the sql query below.
SELECT XMLELEMENT ("ROW",
XMLELEMENT ("CELL", xmlattributes ('EBIZCZMDL_01' AS "colname"), inventory_item_id),
XMLELEMENT ("CELL", xmlattributes ('EBIZFFMT_01' AS "COLNAME"), attribute29),
XMLELEMENT ("CELL", xmlattributes ('COMMON' AS "COLNAME"),inventory_item_id || '' || attribute29 || 'ITM')
AS "RESULT") "XMLDATA"
FROM apps.mtl_system_items_b
When we try to write the the data from this query to a file using UTL_FILE.put_line, the script gives the error
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
If somebody can help us pls.......
Thanks in advanceHi Odie,
We are looking at the xml data to be like the below:
- <xref xmlns="http://xmlns.oracle.com/xref">
- <table name="NAPP_ITEM_ITEMID">
- <columns>
<column name="EBIZFFMT_01" />
<column name="COMMON" />
<column name="EBIZQOT_01" />
<column name="EBIZCZMDL_01" />
<column name="EBIZCZGOLD_01" />
</columns>
- <rows>
- <row>
<cell colName="EBIZFFMT_01">154</cell>
<cell colName="COMMON">154811809990111362727</cell>
<cell colName="EBIZQOT_01">81</cell>
<cell colName="EBIZCZMDL_01">91</cell>
<cell colName="EBIZCZGOLD_01">991</cell>
</row>
- <row>
<cell colName="EBIZFFMT_01">180</cell>
<cell colName="COMMON">180811809990111362727</cell>
<cell colName="EBIZQOT_01">871</cell>
<cell colName="EBIZCZMDL_01">731</cell>
<cell colName="EBIZCZGOLD_01">341</cell>
</row>
</rows>
</table>
</xref>
We have managed half way trying to get the structure. As we are new to this XML Programming.
The call to dbms_xslprocessor.clob2file is within the cursor loop for the given SQL.
DECLARE
l_file_name VARCHAR2 (30);
l_file_path VARCHAR2 (200);
CURSOR xml_cur
IS
SELECT XMLELEMENT
("ROW",
XMLELEMENT ("CELL",
xmlattributes ('EBIZCZMDL_01' AS "colname"),
inventory_item_id
XMLELEMENT ("CELL",
xmlattributes ('EBIZFFMT_01' AS "COLNAME"),
attribute29
XMLELEMENT ("CELL",
xmlattributes ('COMMON' AS "COLNAME"),
inventory_item_id || '' || attribute29 || 'ITM'
) AS "RESULT"
) "XMLDATA"
FROM apps.mtl_system_items_b
WHERE attribute29 IS NOT NULL;
BEGIN
l_file_path := '/usr/tmp';
l_file_name := 'TEST_XREF4.xml';
FOR xml_rec IN xml_cur
LOOP
dbms_xslprocessor.clob2file(xml_rec.XMLDATA, l_file_path, l_file_name, nls_charset_id('UTF8') );
END LOOP;
END;
Please see the above code snippet and help us if we are doing something wrong.
Thank you -
Want to write some data into xls or cvs in defferent sheet
Hello,
I want to write some data into xls or cvs in defferent sheet (under one xls or csv file).
suppose i have 3 StringBuffer i want to to write one StringBuffer into one sheet1 another one in sheet2 and last one in sheet3.
Please suggest me somthing.First of: csv files don't have sheets. Only Excel files have that.
Second: for Excel you'll have to find a library that implements that format for you. Apache POI is one possible choice, jExcelAPI is another one. -
Help to export data into a file
Hi,
I am having more than 200 columns in a table. Client wants to export the data into a file with all 215 columns data. When i write the select * from tablename into a spool file. It is getting the data into a multiple lines however client wants each record into a single line.(right now records are getting into multiple lines). I tried to use to_nclob(columnname1)....to_nclob(column215), this way it is getting a single line for each record but it is taking much time(means in a table we have 10M records and explain plan is showing 3 days to export the file). Could you please help me how we can achieve these type of functionalities.
Thanks in advanceuser586 wrote:
Hi,
I am having more than 200 columns in a table. Client wants to export the data into a file with all 215 columns data. When i write the select * from tablename into a spool file. It is getting the data into a multiple lines however client wants each record into a single line.(right now records are getting into multiple lines). I tried to use to_nclob(columnname1)....to_nclob(column215), this way it is getting a single line for each record but it is taking much time(means in a table we have 10M records and explain plan is showing 3 days to export the file). Could you please help me how we can achieve these type of functionalities.
Thanks in advance
Hardly surprising it's taking ages to export 10 million rows, if you're doing it through SQL*Plus, as that involves transporting all the data over the network to the client, which is then rendering all that data in the display (which can be slow to scroll, depending on the size of the window) etc.
Better to get the database to access the file system directly, using UTL_FILE (though this does mean that the file is produced on the server) and then transfer the resultant file to where it needs to go.
Example of a generic template to use as a starting point...
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
DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
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.csv');
PL/SQL procedure successfully completed.
Output.csv 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,,10
The 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.
Maybe you are looking for
-
1> I want to define a web-based application as partner application for portal. and define a partner application in portal and set the Home URL and Success URL, the question is from where in portal it can be called ? 2> I want to get portal user withi
-
I have 3 similar Production Machines. I will load any or all of them according to the requirement or acc. to which machine is free. so PP person says, he has to assign only one Work Center to all the three machines as he can not assign more than one
-
Change Excel sheet tab color using Open XML dll
Hi, I want to change the sheet tab color of an excel Xlsx document. I am using the following code but it does not set the sheet color. I get object reference exception when I set the sheet tab color. public static string filepath = @"C:\Test\Book1.x
-
I setup a netlet that uses port 80 and some app specific ports for two different netlets. If I click on one (say webapp1), I will get the correct content for webapp1. I close webapp1. The next one (say webapp2) I will sometimes get the previous web s
-
Color pattern match in consumer producer architecture
The way I currently have my code is as follows: If the number of matches in a color pattern match is greater than 0, it sends the information to the consumer loop. If it is not greater than 0, it doesn't send anything. What I was wondering is, if it