How to save the RichTextBox Content in Text file
hI ,
I NEED TO SAVE THE RichTextBox Content in text file ?
If this IS a LabVIEW question, here's an example of how to load a rich text file (to help if you don't know how to get a rich text in LabVIEW).
If you have a Rich Text Box, you can use the invoke method "SaveFile" to match the function you linked to.
Similar Messages
-
How to save the data present in TEXT BOX?
Hi friends i am able to create a text editor in one of my screen but i want to know how to save the data when the text is entered in that text box and retrive when they open the screen?
Hi ,
Please check the format below since it is based on a working code
first you need to create a text in s010 function module...
there should be some key based on which you plan to save the text..imagine it is Purchase order then..PO+item numner is always unique.eg:0090010(900PO/item10).so in the code you can append these two and they will be unique..so you can always retrieve them,overwrite,save them anytime you need
**************data declarations
TYPES: BEGIN OF TY_EDITOR,
EDIT(254) TYPE C,
END OF TY_EDITOR.
data: int_line type table of tline with header line.
data: gw_thead like thead.
data: int_table type standard table of ty_editor.
****************fill header..from SO10 t-code..when you save you need the unique key..youfill it here and pass it in save_text function module
GW_THEAD-TDNAME = loc_nam. " unique key for the text -> our unique key to identify the text
GW_THEAD-TDID = 'ST'. " Text ID from SO10
GW_THEAD-TDSPRAS = SY-LANGU. "current language
GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created in SO10
*To Read from Container and get data to int_table
CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = int_table
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
others = 5.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop data from int_table and save to int_line-tdline appending it.
*save the text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
HEADER = GW_THEAD
TABLES
LINES = InT_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
IF SY-SUBRC 0.
ENDIF.
*To pass to Container
CALL METHOD EDITOR ->SET_TEXT
hope that the above sample with helps you solve the problem
Please check and revert,
Reward if helpful
Regards
Byju -
How to save the audio bytes in a file
I am capturing the audio from microphone.I write the audio data as bytes to other clients.How can i save the bytes in a wav file and it can be played in future?Please help.I want to write the audio bytes in a wav file
get sample source code from
http://javasolution.blogspot.com/2007/04/record-and-save-audio-using-java.html -
How to write the resultset into a text file
how to write the resultset into a text file
You can use the java.io.* package to write to files.
API: http://java.sun.com/j2se/1.5.0/docs/api/java/io/package-summary.html
Tutorial: http://java.sun.com/docs/books/tutorial/essential/io/index.html -
How to format the spaces in a text file using bat file scripting
Currently the records in my text file are like this:
100239 0000015.00
QRP
I want them to be like this:
100266 0000015.00 QRP
There should be 6 spaces before the first column and 8 spaces after that. There should be 1 space between the second and third columns.
Generally this file contains approx 1000 records.
Any help is highly appreciated.
Thank you.So far it's like this:
for /f "skip=2 delims=*" %%a in (C:\Bonus_File_Export.txt) do (
echo %%a >>C:\newfile.txt
xcopy C:\newfile.txt C:\Bonus_File_Export.txt /y
del C:\newfile.txt /f /q
I've to format a text file generated by the tool Microstrategy and it feed it to another system in a specific format. Ihave removed the headers with the above script but was unable to remove the spaces between those columns.
You can use this code as a basis for your script:
@echo off
set Line=
if exist d:\temp\newfile.txt del d:\temp\newfile.txt
for /F "skip=2 tokens=1-2" %%a in (d:\temp\test.txt) do call :Sub %%a %%b
goto :eof
:Sub
if not "%2"=="" (
set Line= %1 %2
) else (
echo %Line% %1>>d:\temp\newfile.txt
It works provided that your input file uses this format:
Header line
Header line
100239 0000015.00
QRP
100240 0000016.00
QRR
100241 0000017.00
QRS
100242 0000018.00
QRT
100243 0000019.00
QRU
100244 0000020.00
QRV -
How to skip the first row in Text file (in Sql Loader)
Hi All,
How to say the control file to skip the first row of the text file..
i just going this example
this is my text file:
01308201222455038130820122245503813082012224550382
1090358 474661834012245503813082012 0075 0 00000000000 000000000 00000130820120000000000000000 136.84 -833.3911082012 000000 000 009035847466183 090358 47466183 0015007514300000970001430000097700BH1150274792012081320120811201208122012-08-11-22.45.50.38369899999.0075LIQJGL17
Control file:
OPTIONS
DIRECT = TRUE ,
PARALLEL = FALSE ,
SKIP = 1,
ERRORS = 0
UNRECOVERABLE
LOAD DATA
INFILE <"FILE_DIR">
BADFILE <"FILE_DIR">
INSERT
INTO TABLE DAILY_TRANSACTION
WHEN (1:1)='D'
TRAILING NULLCOLS
Above the Eaxmple text file i need to Skip the first row which is
01308201222455038130820122245503813082012224550382
please can anyone suggest me is this correct?
if not please correct me please
since two days i been serching but i didn't get any thing
Thank's
Edited by: Lavanya on 24-Sep-2012 00:51Lavanya wrote:
Hi Jeneesh,
Thank you for your prompt replay
I didn't try to load this control file
And i need one more question
I have Text file in my Machine which Contains very huge data so i was wrote one control file for that, and i got FTP connection also as well as.
My question is firstly I need to PUT the Text file Into Unix Server isn't?
so when i trying to put the text file into unix it's giving an error
ftp>put c:/abc.txt
Not connectedYou haven't succesfully made your FTP connection to the server.
e.g.
c:\>ftp
ftp> o testserver
Connected to testserver.mycompany.com.
220 testserver FTP server ready.
User (testserver.mycompany.com:(none)): myuser
331 Password required for myuser.
Password:
230 User myuser logged in.
ftp>then you can use FTP to put your data to the server. Remember, if you are transferring a text file from a windows based operating system to a unix server you need to put it in ASCII mode...
ftp> ascii
200 Type set to A.
ftp>which will automatically convert the windows CR/LF pairs to the single LF character used by unix. -
How to save the time to a .txt file and retrive it back as time?
I have to save the time [hour:minute:second] and the date [date:month:year] to a .txt file. I am using the Calendar API to set the time and date as below
FileOutputStream fileStream = new FileOutputStream ("what.txt");
PrintWriter pw=new PrintWriter(fileStream, true);
Calendar curDate = Calendar.getInstance();
System.out.print(curDate.get(Calendar.DATE)+":");
System.out.print(months[curDate.get(Calendar.MONTH)]+":");
System.out.print(curDate.get(Calendar.YEAR));
pw.println(curDate);
I'll have to retrive these data back to use it to set timer
timer = new Timer();
timer.schedule(new RemindTask(), time);
I try to retrive the data and use the Calendar API to that data by using the below program.
I get the error as :
C:\t\Retrivedate.java:41: int cannot be dereferenced
System.out.print(t.get(Calendar.DATE)+":");
How can I solve this so that I can use Calendar API on my retrived data?
import java.io.*;
import java.util.*;
import java.lang.*;
class Test {
public static void main(String args[]) {
try {
File inputFile = new File("what.txt");
FileReader in = new FileReader("what.txt");
int t;
char[] tmp = new char[100];
int cnt = in.read(tmp);
String tm="";
for (int j=0;j<cnt;j++)
{ tm+=tmp[j];
try {
t=Integer.parseInt(tm,10);
catch (NumberFormatException exception) {}
System.out.println("jika "+tm);
Calendar curDate = Calendar.getInstance();
String months[]={
"Jan","Feb","Mar","Apr",
"May","June","July","Aug",
"Sept","Oct","Nov","Dec"};
Date time1 = curDate.getTime();
System.out.print(" \n"+time1.getHours());
System.out.print(":"+time1.getMinutes());
System.out.println(":"+time1.getSeconds());
System.out.print(t.get(Calendar.DATE)+":");
System.out.print(months[t.get(Calendar.MONTH)]+":");
System.out.print(t.get(Calendar.YEAR));
in.close(); }
catch (IOException ex) {
System.out.println("IOException:"+ex.toString()); }These lines do not make sense:
System.out.print(t.get(Calendar.DATE)+":");
System.out.print(months[t.get(Calendar.MONTH)]+":");
System.out.print(t.get(Calendar.YEAR));
1. t is an integer, it does not have any methods.
2. It's a bad idea to use char[] to retrive the date. You should use readLine() method to retrieve the whole date string, say "10/23/2001" (certainly you can have hours, minutes, seconds, etc.). Then you need to use SimpleDateFormat class to parse this string. SimpleDateFormat gives you everything to parse a date string in any format you want.
PC -
How to save the visual settings in css file ?
hi all,
I have designed a chart using java and ilog API, and i am applying the visual setting from .css file. But i have some option in GUI to change the visual settings. For ex: background color,leged text syle etc. I should provide one button to save the existing visual settings of the graph in .css. ( It may replace or edit the existing .css file. Please help me out regarding this.
thanks in advance
Mohanraj.KWe can use the css file to apply the styles to chart... We have some readymade API it does that. It not only for HMTL. So when we run our application first time it will read the .css file and apply the properties. For example The background color in .css file is green. When we run the application first time it will apply green color to the chart background. Then i have some API it changes the chart background as user wants. for ex : red. When i close the application the i have to replace the .css background value as red from green. And we have to save the changed .css. My Q is very much unambiguous..
please help me out
Mohanraj.K -
How to download the SAP client into text file
Hi,
I want to download a SAP client to a text file for backup and then upload it again for restoration when needed. Can this be done?Hi,
Regarding which data you want to export, you have to select the corresponding profiles in SCC8:
If you want to export transaction data & master data (this is together known as application data), then you have to select the appropriate profile. Alongwith application data, customizing data would also be there, because it cant be transferred alone. ALso, you can choose whether to export user data or not.
But please note that repository data (programs etc) would not be part of this export.
The transaction is SCC8 for client export.
For importing you can import like any other transport request.
For details you could refer to the below link:
http://help.sap.com/saphelp_47x200/helpdata/en/69/c24c824ba111d189750000e8322d00/frameset.htm
Thanks & Regards,
Kunal. -
How to save a UTF-8 encoded text file ?
hi People
I have a little script which reads the source text from a layer and saves it to a .txt file. This is on a Mac and all was good until recently when I tried opening the .txt file on a PC in Notepad and found my ˚ degree symbols all whack.
Resaving the .txt file in TextEdit as Unicode (UTF-8) encoding solved the problem, now opens fine in Notepad.
But ideally I'd like the script to output the .txt as UTF-8 in the first place. It's currently Western (Mac OS Roman). I've tryed adding in myfile.encoding = "UTF8" but the resulting file is still Western (and the special charaters have wigged out again)
any help greatly appreciated../daniel
var theComp = app.project.activeItem;
var dataRO = theComp.layer("dataRO").sourceText;
// prompt user to save file
var theFile = new File ("~/Desktop/"+ theComp.name + "_output.txt");
theFile = theFile.saveDlg("Save an ASCII export file.");
if (theFile != null) { // check user didn't cancel dialog
theFile.lineFeed = "windows";
//theFile.encoding = "UTF8";
theFile.open("w","TEXT","????");
theFile.writeln("move details:");
theFile.writeln(dataRO.value.toString());
theFile.close();Hi,
Got it, it seems, the utf-8 standard use 2-bytes (and more) encoding on accents and special characters.
I found some info there with some code http://ivoronline.com/Coding/Theory/Tutorials/Encoding%20-%20Text%20-%20UTF%208.php
However there was some error so I fixed it. (However for 3 and 4 bytes characters i didnt test it. So maybe you'll have to change back the 0xbf to 0x3f or something else.)
So here is the code.
Header 1
function convertCharToUTF(character){
var utfBytes = "";
c = character.charCodeAt(0)
if (c < 0x80) {
utfBytes = String.fromCharCode (c);
else if (c < 0x800) {
utfBytes = String.fromCharCode (0xC0 | c>>6);
utfBytes += String.fromCharCode (0x80 | c & 0xbF);
else if (c < 0x10000) {
utfBytes = String.fromCharCode (0xE0 | c>>12);
utfBytes += String.fromCharCode (0x80 | c>>6 & 0xbF);
utfBytes += String.fromCharCode (0x80 | c & 0xbF);
else if (c < 0x200000) {
utfBytes += String.fromCharCode (0xF0 | c>>18);
utfBytes += String.fromCharCode (0x80 | c>>12 & 0xbF);
utfBytes += String.fromCharCode (0x80 | c>>6 & 0xbF);
utfBytes =+ String.fromCharCode (0x80 | c & 0xbF);
return utfBytes
function convertStringToUTF(stringToConvert){
var utfString = ""
for (var i = 0 ; i < stringToConvert.length; i++){
utfString = utfString + convertCharToUTF(stringToConvert.charAt (i))
return utfString;
var theFile= new File("~/Desktop/_output.txt");
theFile.open("w", "TEXT");
theFile.encoding = "BINARY"
theFile.linefeed = "Unix"
theFile.write("");//or theFile.write(String.fromCharCode (0xEF) + String.fromCharCode (0xEB) + String.fromCharCode (0xBF)
theFile.write(convertStringToUTF("Your stuff éàçËôù"));
theFile.close(); -
How to save changes back into binary text file
I have a repository with a single binary field that contains an HTML file
I have a pageflow with a form where users can edit content, including the contents of the HTML file.
Can I just treat that like any other property:
If the name of my binary field containing an HTML file is “fileâ€
Can I just treat it like any other field in the repository and do :
<pre>
try{
properties = node.getProperties();
properties[0] = new Property("title",new Value(form.title));
properties[1] = new Property("description",new Value(form.description));
properties[2] = new Property("file",new Value(form.contentText));
properties[3] = new Property("author",new Value(form.author));
node.setProperties(properties);
String title = form.title;
nodeId = node.getId();
title = node.getProperty("title").getValue().toString();
} catch(Exception e){
e.printStackTrace();
error = "error1";
RepositoryManager manager = null;
try{
manager = RepositoryManagerFactory.connect();
NodeOps nodeOps = manager.getNodeOps();
nodeOps.updateProperties(nodeId, properties);
} catch(Exception e){
error += "error2";
e.printStackTrace();
</pre>
Thanks much.I have a repository with a single binary field that contains an HTML file
I have a pageflow with a form where users can edit content, including the contents of the HTML file.
Can I just treat that like any other property:
If the name of my binary field containing an HTML file is “fileâ€
Can I just treat it like any other field in the repository and do :
<pre>
try{
properties = node.getProperties();
properties[0] = new Property("title",new Value(form.title));
properties[1] = new Property("description",new Value(form.description));
properties[2] = new Property("file",new Value(form.contentText));
properties[3] = new Property("author",new Value(form.author));
node.setProperties(properties);
String title = form.title;
nodeId = node.getId();
title = node.getProperty("title").getValue().toString();
} catch(Exception e){
e.printStackTrace();
error = "error1";
RepositoryManager manager = null;
try{
manager = RepositoryManagerFactory.connect();
NodeOps nodeOps = manager.getNodeOps();
nodeOps.updateProperties(nodeId, properties);
} catch(Exception e){
error += "error2";
e.printStackTrace();
</pre>
Thanks much. -
How to save the text from text area back to a text file?
Hi all,
Now I am doing a small panel which containts a JTextArea, this TextArea will read the content from a text file, then display the content of the text file on the TextArea itself.
My idea is, allow the user to modify the content in the textarea (I set it Editable=true;), then save it. After the user press the save button, the content in the text file will be updated accordng to the user;s modification on TextArea.
I had done the displaying part by using JavaI/O (BufferReader), now any expert here know how to update the TextArea content back to the text file itself? PLease teach me, THANKS !!!NOw I had manage to clear out the error, but now the problem is when I click on the 'save' button, this function clear out the entire text file for me !!!
The code are as below:
if(e.getSource()== vButtons[0])
try{
String str;
String Ky = tArea.getText();
BufferedWriter buffWrite=null;
BufferedWriter in1 = new BufferedWriter(new FileWriter("Keyword.txt"));
buffWrite.write(Ky);
buffWrite.flush();
buffWrite.close();
in1.close();
catch (IOException ex) {
ex.printStackTrace();
if(e.getSource()== vButtons[1])
new panel();
dispose();
if(e.getSource()== vButtons[2])
System.exit(0);
} Please tell me how to save the TextArea to the text file, THANKS !!! -
How to save the bean area content to the database
DB version:10g
forms version:10g
Hi Guys,
I have used text editor PJC/java bean in my screen where i have attched it to "bean area" field.Iam able to do all the changes to the to the text entered in this "bean area" but when i save this in the database it says no changes to save.in my table the column type is Varchar2.
any ideas of how to save the changes of a bean area to the database???
regards@François Degrelle -Ya frank i have already checked Get_Custom_Property() but the problem is this is returning the HTML code like
html>
<head>
</head>
<body>
This is a <b>styled</b> (<i><u>HTML</u></i>) text<br><b><font color="#0066FF" face="Arial">
displayed</font></b> and <b><font color="#008000" face="Arial">edited</font></b><br>
in an <b><font color="#FF0000" face="Arial">Oracle Forms</font></b> application
</body>
</html>
but want the data to be in the formatted so that i can store the data in the column and retrieve formatted text into the text field so that user can see only the formatted text that is lets say
shdjshdsjdsdsdlas -original text
shdjshdsjdsdsdlas -formatted text
now i want to strore shdjshdsjdsdsdlas this text into teh database so that when i retrieve shdjshdsjdsdsdlas this data should be shown.
regards
Edited by: user123 on May 27, 2011 4:22 PM -
How to save the data to sap abap using Adobe Flex
Hi Everybody......
I am new to Adobe flex with sap abap.
How to save the data in sap abap using Adobe Flex coding is Action Script and using RFC web service.
Please give me any suggisions on that.
Thank you
Venkatesh VHi Venkatesh,
Try with folowing coding...
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
initialize="initApp()">
<mx:Label x="10" y="23" text="Airline" width="90" id="lblAirline"/>
<mx:TextInput x="108" y="21" id="txtAirline"/>
<mx:Button x="10" y="49" label="Get Data" id="btnGetData" enabled="false" click="getData()"/>
<mx:DataGrid x="10" y="97" id="dgFlightData" dataProvider="">
</mx:DataGrid>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.AbstractOperation;
import mx.rpc.events.FaultEvent;
import mx.rpc.soap.LoadEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.soap.WebService;
[Bindable] public var flightData:ArrayCollection;
private var flightWS:WebService;
private function initApp():void{
flightWS = new WebService();
flightWS.wsdl = "http://uscib20.wdf.sap.corp:50021/sap/bc/soap/wsdl11?services=ZGTEST&sap-client=000";
flightWS.addEventListener(FaultEvent.FAULT,onWSError);
flightWS.addEventListener(LoadEvent.LOAD,onWSDLLoaded);
flightWS.addEventListener(ResultEvent.RESULT,onFlightWSGotResult);
flightWS.loadWSDL();
private function getData():void{
var operation:AbstractOperation = flightWS.getOperation("ZGTEST");
var input:Object = new Object();
input.Airline = txtAirline.text.toUpperCase();
operation.arguments = input;
operation.send();
private function onWSError (event:FaultEvent):void{
private function onWSDLLoaded(event:LoadEvent):void{
btnGetData.enabled = true;
private function onFlightWSGotResult(event:ResultEvent):void{
flightData = event.result.SFLIGHT;
]]>
</mx:Script>
</mx:Application>
Regards,
Vinoth -
How to save the form data into adobe db?
Hi All,
How to save the form data into adobe db?
I have designed one xdp file.
Through processFormSubmission(), I got the submitted form data as Document obj.
Then I have called the workflow kickoff program.
code:
InvocationRequest request = myFactory.createInvocationRequest ("myprocessname", //Specify the long-lived process name
"invoke", //Specify the operation name
params, //Specify input values (HashMap obj)
false); //Create an asynchronous request
It successfulyy started the workflow, but the submitted form data is not saved anywhere.
And also, How get the form data from tables?
Please provide the solution for the above.
Thanks in advance.
Regards,
Saravanan GYou need to create a process variable of type IN if you want to be able to pass data to your process. Then the params parameter (HashMap) contains a list of all the IN variables with their content that you want to pass to your process. They key is the name of the variable and the value the content. That way you should get it in your process.
Now LiveCycle will create a column in the database for every process variable, so the content will be saved in the database just by creating that process variable.
Jasmin
Maybe you are looking for
-
PAYABLES OPEN INTERFACE INVOICE IMPORT 시 REQUIRED FIELD 정보
제품 : FIN_AP 작성날짜 : 2005-05-10 PAYABLES OPEN INTERFACE INVOICE IMPORT 시 REQUIRED FIELD 정보 ========================================================== PURPOSE AP Open Interface Invoice Import 를 통해 Invoice 를 생성 코자 할 경우 반드시 필요한 Field 에 대한 정보이다. Explanatio
-
Hi, I am using a Mac computer that my husband set up. I have worked on it recently with no problems. Today, I am having problems with the bluetooth keyboard not working properly. The numbers 1 through 9 do not work. I have gone through troubles
-
Create excel file on application server
Hi experts, Is it possiblel to create an excel file on the application server in a background process ? We have an windows nt application server. I tried with open dataset ..but i didn't work 100% good. has anybody any sample ? Thanks.
-
Hi Guys, We tried to do delivery against a sales order. There was enough stock and the sloc is warehouse relevent. When we tried to create delivery in VL01N it created delivery. since it is warehouse relevent we tried to create TO against delivery in
-
I've created a 16x20 crop aspect via the Develop / Crop & Straighten tools as I did in LR v2. However, when I move the 16x20 crop overlay, up or down for example, it changes it to the 4 x 5 / 8 x 10 crop aspect. I'm not even changing the size of