May ID isolate tables from plain text in a file?
In a big Word file it seems necessary to isolate the tables from the rest of paragraphs.
Unfortunately the body style applied to both is the same style.
Have tables some formatting element to get only them?
Yes, a new thread...
Just we have a huge file with text and tables and need to place the tables at the end of the book. Just the tables. Plain text at the beginning.
Import options for text surely allows to place only text (unchecking graphs) but it is not an option to place only graphics, as far as we tried in the menu.*
Thank you.
*Furthermore, the Word brings the same style applied to tables and text... Book has to be managed in two parts.
Similar Messages
-
Sql/Plsql code to export data into a temporary table from a text file
Dear all,
I need to create a temporary table getting data from a text file. I am very new to data loading could you please help me how to read the text file in to a temporary table.
i have text file like as below:
order items : books Purchasing
start date:
8-11-09
Notes: Books are selling from aug10 to aug 25
Action performed
Time
Verified By
sold out from shop, sold out date:_________
1.
physics _______ book sold to ravi
2.
social _______ book this is a good book
sold to kiran
aug10th
ronald
3.
maths book to sal
4.
english book__________ this was a newbook
to raj
jak
return to shop, return date:____________
1.
maths book return by:_____________ Verify book
aug11th
john
2.
story book by:_________ checked
aug14th
Now i need to create a temporary table and insert the data into the table from this text file.
Now i need to create a temporary table named as books_order with 5columns(order,Status,Action_Performed,Time,Verified_By) like as below:
Order status Action_Performed Time Verified_By
books Purchasing sold physics _______ book sold to ravi _______ _________
books Purchasing sold social _______ book this is a good book sold to kiran aug10th ronald
books Purchasing sold maths book to sal _____ __________
books Purchasing sold english book__________ this was a newbook to raj __________ jak
books Purchasing return maths book return by:_____________ Verify book aug11th john
books Purchasing return story book by:_________ checked aug14th _________
Thanks in advance.Isn't school work marvelous?
Create an external table.
http://www.morganslibrary.org/reference/externaltab.html
Getting the data into a temporary table may make sense in SQL Server ... but not in Oracle. -
How to copy a table from one text frame to another...
Is there a way to copy a table from one text frame to another? I'm using JavaScript. The following will move a table from one text frame to another, but I need to copy.
var srcFrame = document.textFrames.item("section-template");
var dstFrame = document.textFrames.item("test");
srcFrame.characters[0].move(LocationOptions.before, dstFrame.insertionPoints[0]);
Thanks,
Mike-Hi Bhupinder,
According to your description, you want to copy a table with Primary keys from one database to another database.
As per my understanding, I think the best method is use Transfer SQL Server Objects Task in SQL Server Integration Services. The Transfer SQL Server Objects task transfers one or more types of objects in a SQL Server database between instances of SQL Server.
Server roles, roles, and users from the specified database can be copied, as well as the permissions for the transferred objects. Indexes, Triggers, Full-text indexes, Primary keys, Foreign keys can also be copied.
To use the Transfer SQL Server Objects Task, we should create a SQL Server Integration Services Project in SQL Server Data Tools, then drag a Transfer SQL Server Objects Task to Control Flow pane. Specify SourceConnection, SourceDatabase, DestinationConnection
and DestinationDatabase for the Connection, select the table in the ObjectsToCopy category, then change CopyPrimaryKeys to True and the other corresponding properties in the task.
References:
Transfer SQL Server Objects Task
Transfer SQL Server Objects Task in SSIS 2008 R2 With Example
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
This may be slightly off-topic, but I'm hoping maybe someone knows the answer:
I received a license for the Messiah animation suite as part of a one-time offer, and it says to paste the License text "into a text file... (this file must be a plain text ASCII format file, NOT Rich Text or doc)."
I have Microsoft Office 2008. It has a Plain Text (.txt) format, but googling there seems to be some uncertainty if in Mac it is plain text ASCII format. The TextEdit app I'm not sure of either I'm pretty sure isn't.
Anyone got a solution?
Thanks!The problem is whether that version of .txt or the MS Office 2008 is actually ASCII format or unicode.
I don't think that is the issue, since ascii and unicode are identical for the usual 26 letters and 10 digits that are probably in the license text. The point is that it be .txt and not .doc or .rtf or .html, which has all kinds of other junk added to the real content. I would use TextEdit set to Plain text. -
Sql/Plsql code to store data into a temporary table from a text file
Dear all,
I need to create a temporary table getting data from a text file. I am very new to data loading could you please help me how to read the text file in to a temporary table.
i have text file like as below:
order* items : books Purchasing
start date:
8-11-09
Notes: Books are selling from aug10 to aug 25
Action performed*
Time*
Verified By*
sold* out from shop, sold out date:_________
+1.+
physics _______ book sold to ravi
+2.+
social _______ book this is a good book
sold to kiran
aug10th
ronald
+3.+
maths book to sal
+4.+
english book__________ this was a newbook
to raj
jak
return* to shop, return date:____________
+1.+
maths book return by:_____________ Verify book
aug11th
john
+2.+
story book by:_________ checked
aug14th
Now i need to create a temporary table with 5columns(order,Status,Action_Performed,Time,Verified_By) like as below:
Now i need to create a temporary table named as books_order with 5columns(order,Status,Action_Performed,Time,Verified_By) like as below:
Order status Action_Performed Time Verified_By
books Purchasing sold physics _______ book sold to ravi _______ _________
books Purchasing sold social _______ book this is a good book sold to kiran aug10th ronald
books Purchasing sold maths book to sal _____ __________
books Purchasing sold english book__________ this was a newbook to raj __________ jak
books Purchasing return maths book return by:_____________ Verify book aug11th john
books Purchasing return story book by:_________ checked aug14th _________
Thanks in advance.Hi,
Thanks for your suggestions. I Was able to get the data using utl_file.get_line. But i was not able to the data if it is in the below format:
I was able to read the data and storing if it is in the same line.But i dont know how to read below data
Book. Type Name Location Ownership Code
Story SL hyd SS-HYD
In this data i have to search for 'Book. type' and then i need to save the word 'Story' to the column 'Book_type'
Then i need to search for 'Name' and i need to save 'SL' into the column into 'Name'
Then i need to search for 'Location' and i need to save 'hyd' into the column into 'Location'
I was able to extract the data if it is in below format using utl_file.get_line
Known Author: Unknown
Less Selling Factors: Thunderstorms
Reason: Unknown
Any one can explain me how to solve the above criteria.
Below i am explaining the same problem in detail.
I have a text file as below and i have a table having 12 columns. Now i need to insert this text file into the table story_books.
CREATE TABLE story_books
book_id NUMBER,
Category VARCHAR2(100 BYTE),
Book_type VARCHAR2(100 BYTE),
Name VARCHAR2(700 BYTE),
Location VARCHAR2(700 BYTE),
Ownership_code VARCHAR2(700 BYTE),
Author VARCHAR2(700 BYTE),
Less_Sel_fact VARCHAR2(700 BYTE),
Reason VARCHAR2(700 BYTE),
Buying VARCHAR2(700 BYTE),
Suspected Book VARCHAR2(700 BYTE),
Conditions VARCHAR2(700 BYTE)
-------------------------text file---------------
Books Out Table: Books
Book. Type Name Location Ownership Code
Story SL hyd SS-HYD
Known Author: Unknown
Less Selling Factors: Thunderstorms
Reason: Unknown
Buying (if applicable):
Not Applicable
Suspected Book:
Unknown
Conditions to increace sales:
Advertisement in all areas
i was able to read the data and storing if it is in the same line.But i dont know how to read below data
Book. Type Name Location Ownership Code
Story SL hyd SS-HYD
In this data i have to search for 'Book. type' and then i need to save the word 'Story' to the column 'Book_type'
Then i need to search for 'Name' and i need to save 'SL' into the column into 'Name'
Then i need to search for 'Location' and i need to save 'hyd' into the column into 'Location'
I was able to extract the data if it is in below format using utl_file.get_line
Known Author: Unknown
Less Selling Factors: Thunderstorms
Reason: Unknown
Any one can explain me how to solve the above criteria.
Thanks in advance. -
Generating html links from plain text
How can I scan a text (a String) and add links when a word is an URL?
I tried the following which works but it's too slow:
String text = rs.getString("text");
text2scan=text.split("[\n ]")
for(int i = 0; i < text2scan.length; i++){
String replacement = null;
String word = text2scan;
log.info(word);
if(word.indexOf(".com")!=-1){
replacement="<a href=\""+word+"\">"+word+"</a>";
text=text.replaceAll(word, replacement);
text=text.replaceAll("www","http://www");
text=text.replaceAll("http://http://","http://");
text=text.replaceAll(">http://",">");
Isn't this already implemented somewhere?
Thanks
NiklasBecause I was semi interested by this issue, and how best to solve it, heres a quick and dirty example program.
It does a very basic job, but should be pretty much equivalent to what you had originally.
package mypackage;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexpMakeHyperlinks {
* Loads a file into a StringBuffer
* @param f File to read
* @return StringBuffer with contents of text file.
* @throws IOException
public StringBuffer loadFile(File f) throws IOException {
System.out.println("Reading file " + f.getAbsolutePath());
BufferedReader in = new BufferedReader(new FileReader(f));
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(new BufferedWriter(sw));
String line = null;
while ((line = in.readLine()) != null) {
pw.println(line);
pw.flush();
in.close();
return sw.getBuffer();
* Writes the contents of a StringBuffer to file
* @param f File to write to
* @param sb Text to write to file
* @throws IOException
public void writeToFile(File f, StringBuffer sb) throws IOException{
System.out.println("Outputting to " + f.getAbsolutePath());
BufferedReader in = new BufferedReader(new StringReader(sb.toString()));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f)));
String line = null;
while ((line = in.readLine()) != null) {
out.println(line);
out.flush();
in.close();
* Converts all urls like "www.google.com" into hyperlinks in the text.
* @param initialText The text to convert
* @return Converted text.
public StringBuffer convertText(StringBuffer initialText) {
StringBuffer result = new StringBuffer(initialText.length());
Pattern p = Pattern.compile("(href=\")?(http://)?www\\..*?.com\\b");
Matcher m = p.matcher(initialText);
while (m.find()) {
String href = m.group();
// ignore links that are already hyperlinks
if (href.startsWith("href")){
continue;
// add on the http:// if necessary
if (!href.startsWith("http://")) {
href = "http://" + href;
// add the new text into the output.
m.appendReplacement(result, "<a href=\"" + href + "\">" + href + "</a>");
m.appendTail(result);
return result;
* Testing method for experimenting with the patternmatching
* @param text
public void matchLink(String text) {
System.out.println("Analyzing text " + text);
Pattern p = Pattern.compile("(http://)?www\\..*?.com\\b");
Matcher m = p.matcher(text);
while (m.find()) {
System.out.println("Found: " + m.group());
public static void main(String[] args) {
RegexpMakeHyperlinks hyper = new RegexpMakeHyperlinks();
String[] testStrings = { "www.google.com", "www.myspace.net", "make sure you visit www.yahoo.com for details", "Two sites: http://www.java.com and http://www.javabeans.com" };
for (int i = 0; i < testStrings.length; i++) {
hyper.matchLink(testStrings);
System.out.println();
System.out.println("----------------------------");
System.out.println();
File inFile = new File("makeHyperlinkTest.txt");
File outFile = new File("makeHyperlinkTest.output");
try{
StringBuffer sb = hyper.loadFile(inFile);
StringBuffer result = hyper.convertText(sb);
hyper.writeToFile(outFile, result);
catch(Exception e){
System.out.println("Error " + e.getMessage());
e.printStackTrace(System.out);
And a test file makeHyperlinkTest.txt
This file just contains plain text with hyperlinks to places like www.google.com and http://www.yahoo.com.
The program I have written will convert these links like www.google.com into hyperlinks for displaying as html.
Make sure you visit http://www.java.sun.com and read all about Java.
And if I already have an <a href="www.google.com">Hyperlink</a> in this file it should leave it alone right? -
Loading table from Access, Excel or CSV file
Hi,
I would like to know the mechanism of loading a table from an external source such as Access table, Excel sheet, text file containing comma/tab delimited values.
Can you please indicate me the basic steps to prepare the extraction of the source data and next how to load this data into a target Oracle table?
Thanks very much in advance.If you are using a windows based Oracle server you can locate your files on the server and set them up as external databases using Oracles Heterogeneous Services (HS)... e.g. with Excel workbook...
1- Go to Control Panel>Administrative Tools>Data Sources (ODBC)>System DSN and create a data source with appropriate driver. Name it EXCL.
2- In %ORACLE_HOME%\Network\Admin\Tnsnames.ora fie add entry:
EXCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.0.24)(PORT = 1521))
(CONNECT_DATA =
(SID = EXCL)
(HS = OK)
Here SID is the name of data source that you have just created.
3- In %ORACLE_HOME%\Network\Admin\Listener.ora file add:
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = <hs_sid>)
(ORACLE_HOME = <oracle home>)
under SID_LIST_LISTENER like:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\ORA9DB)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = ORA9DB)
(ORACLE_HOME = d:\ORA9DB)
(SID_NAME = ORA9DB)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = EXCL)
(ORACLE_HOME = D:\ora9db)
Dont forget to reload the listener
c:\> lsnrctl reload
4- In %ORACLE_HOME%\hs\admin create init<HS_SID>.ora. For our sid EXCL we create file initexcl.ora.
In this file set following two parameters:
HS_FDS_CONNECT_INFO = excl
HS_FDS_TRACE_LEVEL = 0
5- Now connect to Oracle database and create database link with following command:
SQL> CREATE DATABASE LINK excl
2 USING 'excl'
3 /
Database link created.
Now you can perform query against this database like you would for any remote database.
SQL> SELECT table_name FROM all_tables@excl;
TABLE_NAME
DEPT
EMP
With MS Access you are already dealing with a database so the structure is not a problem. If you treat Excel workbooks as a database then they have to conform to a certain layout e.g. each worksheet is in effect a table with the name of the table taken from the worksheet name (be aware that Excel allows 32 characters for sheet names, but Oracle requires no more than 30), on each sheet the first row must contain the column names and all subsequent rows contain the data.
;) -
Read Plain-Text vom Upload File
Hi,
i have the following file :export.txt:
Content: Hello World
It´s upload to the XDB-Server => /marco/export.txt
When i try to read from this file, i got the following result:
SQL> SELECT extract(res, '/Resource/Contents/text').getClobVal() xml_doc
2 FROM resource_view
3 WHERE any_path = '/marco/export.txt';
XML_DOC
<text xmlns="http://xmlns.oracle.com/xdb/XDBResource.xsd">Hello World</text>
I would like to have only "Hello World". What can i do ?
Thanks in advance
MarcoSorry but this dosn´t work for me. I uploaded my alert.log File and i tried to read it...
SELECT path FROM PATH_VIEW
WHERE UNDER_PATH(res, '/marco/', 1) > 0
/marco/export.txt
/marco/alert.log
SQL> select xdburitype('/marco/alert.log').getClobVal() from dual;
select xdburitype('/marco/alert.log').getClobVal() from dual
FEHLER in Zeile 1:
ORA-00904: "SYS"."XDBURITYPE"."GETCLOBVAL": ungültiger Bezeichner
SQL> SELECT extractvalue(res, '/Resource/Contents/text').getClobVal() xml_doc
2 FROM resource_view
3 WHERE any_path = '/marco/alert.log'
4 ;
SELECT extractvalue(res, '/Resource/Contents/text').getClobVal() xml_doc
FEHLER in Zeile 1:
ORA-22806: Kein Objekt oder REF
What is the usual way to transfer text or binary files from xdb to a table ?
Thanks
Marco -
Password displayed in plain text in sql file
Hi all,
I have a shell script that calls another sql file to connect to the database and do some queries. The username and password used to connect to the databse are in plain text in the sql file. My question is how can I hide these parameters in the sql file and be able to connect to the database.
Thanks in advance.Oracle have something to do such thing : Secure External Password Store
Laurent Schneider posted an example of usage on his blog : sqlnet.wallet_override=true
Or you have an external tool : Oracle Password Repository which seems easy to use.
Nicolas. -
How can I update a customized table from a text document?
Hi,
I am one sample file. The file is an text document. From this .txt file how can I update a customized table in SAP.
How can I Update the fields in the Customized table.
Thanks & Regards,
NManohar.use the Function module GUI_UPLOAD or WS_UPLOAD and give the path and the file name from where the data has to be uploaded. in table parameter give the iternal table
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename =
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
and finally use insert command to update the database table with the data -
Convert an internal table from ABAP to an xml file on the Unix server
I'm trying to convert an internal table to an xml file. This file will be downloaded to a unix server. Can someone help?
Hello Linda,
You can combine the code given by Mahalakshmi with something like this:
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = 'YOUR_LOGICAL_FILE_NAME
parameter_1 = l_file_name_xml
IMPORTING
file_name = l_file_server
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
TRY.
OPEN DATASET l_file_server FOR OUTPUT. "<IN TEXT MODE> <ENCODING DEFAULT>.
ENDTRY.
IF sy-subrc = 0.
LOOP AT lt_xml INTO ls_xml.
TRANSFER ls_xml TO l_file_server.
ENDLOOP.
CLOSE DATASET l_file_server.
ENDIF.
ENDIF.
You need to have the server path defined (look at the paths with tcode AL11) and the file logical name with tcode FILE
Best regards,
Andri -
How do create an analog signal from a text or binary file?
I'm trying to output an analog signal from a file on an NI-DAQ 6251 card using labview 8.5. I've found the examples on building a waveform, but I'm stuck at how to read a text file and make a 1-D array to input my amplitudes into the buildwaveform.vi and I can't find any information on how to do so. Any help or direction is greatly appreciated.
thanks,
David
Solved!
Go to Solution.If all that you want in the file is the Y values, then a text file with a value on each line could be read. The Read From Spreadsheet File can be used. It will return a 2D that you can then use the index array function to get a column or if you select Transpose, the returned 1D array would be used.
If you want to create an example, use a 1D array constant in a VI and pass it to the Write to Spreadsheet File. -
Loading the data from a text file to a table using pl/sql
Hi Experts,
I want to load the data from a text (sample1.txt) file to a table using pl/sql
I have used the below pl/sql code
declare
f utl_file.file_type;
s varchar2(200);
c number := 0;
begin
f := utl_file.fopen('TRY','sample1.txt','R');
loop
utl_file.get_line(f,s);
insert into sampletable (a,b,c) values (s,s,s);
c := c + 1;
end loop;
exception
when NO_DATA_FOUND then
utl_file.fclose(f);
dbms_output.put_line('No. of rows inserted : ' || c);
end;
and my sample1.txt file looks like
1
2
3
The data is getting inserted, with below manner
select * from sampletable;
A B C
1 1 1
2 2 2
3 3 3
I want the data to get inserted as
A B C
1 2 3
The text file that I have is having three lines, and each line's first value should go to each column
Please help...
Thanksdeclare
f utl_file.file_type;
s1 varchar2(200);
s2 varchar2(200);
s3 varchar2(200);
c number := 0;
begin
f := utl_file.fopen('TRY','sample1.txt','R');
utl_file.get_line(f,s1);
utl_file.get_line(f,s2);
utl_file.get_line(f,s3);
insert into sampletable (a,b,c) values (s1,s2,s3);
c := c + 1;
utl_file.fclose(f);
exception
when NO_DATA_FOUND then
if utl_file.is_open(f) then utl_file.fclose(f); ens if;
dbms_output.put_line('No. of rows inserted : ' || c);
end;SY. -
How do I save e-mail content on my MacBook Air,so I may print them as plain text?
How do I save e-mail content on my MacBook Air, so I may ptint the content as plain text?
10.7 Lion
http://support.apple.com/kb/PH4858
10.8 Mountain Lion
http://support.apple.com/kb/PH11746 -
Update the z table from the header text of VF01 on save
Hi All,
I have a Z table 'ZEXIM_LICDETAILS'. Whenever a billing doc. of type 'ZEXP' is created with tcode VF01, the Z table fields should also be updated. I have learned that we cannot include tabs in Billing Doc, so the licence number is put in the header text of the VF01.
Is there any way that I can update my Z table from header text, when we save the VF01.
Waiting for your repy in anticipation.
Thanks a lot in advance,
AnuWrite code in USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
Reddy
Maybe you are looking for
-
In labview how do I cleardata from chart
I am completely new to LabView and having what is probably a very basic problem. I have a button that starts collecting data into an array this is then displayed in a chart. when I stop the button and then restart it I want the graph to clear but it
-
Bonjour tab in safari does not show any Macs
Hi there, I have a lan and it has 4 macs, a printer and a tivo on it. (and a couple of other things as well) When I open safari on a mac (any mac) the Bonjour bookmarks show ONLY the printer and the tivo, and NO macs. I assume I should see the machin
-
ok, I don't really understand the usage of Xnest... it starts fine with "Xnest :1" but I cannot execute anything in that display (DISPLAY=":1" xterm fails... cannot connect to display :1.0) I'd like to use xnest to mess with other window managers w/o
-
Vmware fusion to hyper-v on Windows 8
I am trying to figure out if I can convert my VMWare Fusion images to Hyper-V images. I want to move from my Mac OS X running VMWare Fusion to Windows 8 running Hyper-V, I want to take my VMs with me. Is there a tool or method to do that. The only re
-
Installers Don't Detect An OS On Any Volumes!
Hi, I had some trouble with MS Office 2008 Home & Student a little while ago on my Core 2 Duo iMac (Office applications wouldn't load up) so I uninstalled it, but upon trying to reinstall it I have found that 'Macintosh HD' is grayed-out, with a red