How do I read text from specific rows and columns in a tree structure?
How do I read text from specific rows and columns in a tree structure? In a table you can specify the cell to read from but I have not been able to figure out how to do this with a tree structure.
You need to set two properties to activate the correct cell and then you can read it's string property.
The positioning properties are the "ActiveItemTag" and
"ActiveColNum" properties. With them you select the tree item by it's tag and the active column. The string can then be read from the "Cell String" property.
MTO
Similar Messages
-
Remove specific row and column from 2d array
Hi,
I would like to know how to remove the specific row and column from 2d array.
for example, I have the original 4x4 array as below
2 -1 -1 0
-1 2 0 -1
-1 -1 2 0
-1 -1 -1 3
let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below
2 -1 0
-1 2 -1
-1 -1 3
Thanks.You can't remove elements of an array, it's fixed at a certain size once created. What you can do however is make a new array and only copy the things you want. Something like:public static void main(String[] args) {
Integer[][] bar = new Integer[5][5];
for (int i = 0; i < bar.length; i++) {
Integer[] baz = bar;
Arrays.fill(baz, i);
System.out.println(Arrays.toString(baz));
Integer[][] muu = new Integer[5][4];
removeColumn(3, bar, muu);
for (Integer[] mee : muu) {
System.out.println(Arrays.toString(mee));
Integer[][] smuu = new Integer[4][5];
removeRow(3, bar, smuu);
for (Integer[] mee : smuu) {
System.out.println(Arrays.toString(mee));
public static <T> void removeRow(int row, T[][] a, T[][] result) {
if (row >= a.length) {
throw new IllegalArgumentException("no row at " + row);
for (int a_r = 0, result_r = 0; a_r < a.length; a_r++) {
if (a_r == row) {
continue;
System.arraycopy(a[a_r], 0, result[result_r], 0, a[a_r].length);
result_r++;
public static <T> void removeColumn(int col, T[][] a, T[][] result) {
for (int i = 0; i < a.length; i++) {
if (col >= a[i].length) {
throw new IllegalArgumentException("no column at [" + i + ", " + col + "]");
for (int a_i = 0, r_i = 0; a_i < a[i].length; a_i++) {
if (a_i == col) {
continue;
result[i][r_i] = a[i][a_i];
r_i++; -
I have tried intializing an array and replacing elements by specifying a particular row, and column, but in the end I get an array with only one element replaced, and I suspect that it is because as the for loops are running through their iterations each time the array is re-initializing. I have a simple vi that I will post below, it is not the exact situation that I have but is a good place for me to get some understanding. I have the row and column indexes being driven by the inner and outer loop iterations, which gives me the pattern I need. I am using the inner iterations as array elements. How do I set this up so that it works and d
oes keep re-initializing my array.
Attachments:
Untitled.vi 26 KBI have fixed a number of things in your vi.
You were right in thinking that the array was continuously re-initialized. To avoid this, use a shift register (right-click the loop border), which will pass the updated array into the next iteration.
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...
Attachments:
your_vi.vi.zip 13 KB -
I have a Windows server app that generates Excel workbooks to be emailed to political campaign volunteers to be loaded into Numbers on an iPad, edited, then emailed back to be posted to the server database. There are two problems encountered:
1. The Excel workbook has the first row (column headings) and first column (route identifier) of cells locked, so that they will not scroll off the screen, but Numbers doesn't respect the locks, so when the user scrolls horizontally or vertically, the column headings and/or the route identifier scroll off the screen.
2. The Excel workbook has pop-up "tool-tip" type comments in certain column headings in order to provide the user with the acceptable entries for those columns, but Numbers does not respect those. When the user touches any of the commented column heading cells, a context menu appears instead of the comment.
What must I do in the Excel workbook sheets, or what settings can be made in Numbers to correct the above?I imported a Numbers '09 file into Numbers on the iPad. All comments were removed during import. Frozen header row and column were retained.
Thank you for your responses I must ask, however, when you refer to "importing" the Excel file, are you referring to a two step process whereby the Excel file is first converted by some other process into Numbers format, then opened in the Numbers application - which is what I have to do in my PC application to generate the Excel file, and reverse that process to convert the Excel back into my database format - or are you simply referring to opening the file in Numbers as "importing" it? And please excuse any ignorance, as I'm not at all familiar with Apple's terminologies. In fact, I don't own an iPad myself, but rather I have to depend on one of my clients to do the testing for me.
I imported an XLSX file into Numbers on the iPad. The file used "freeze panes" to "freeze" the first column and row. Only warning on import was that it changed fonts. It imported without the first row and column frozen and with no comments. Nothing I can do about the missing comments but it was a simple matter to turn the first column & row into headers and freeze them.
Unfortunately this would not be an efficient solution, since the end users are, for the most part, elderly political campaign volunteers who are fairly computer illiterate. These workbooks are actually canvassing lists - known as walklists. Their purpose is for the volunteers to interview voters, record the results of the interviews, and post the results to a database, which provides the campaigns with valuable strategizing capabilities. Also, these workbooks have multiple pages - as many as 10 or more. and from what I infer from the above, the setting changes would have to be made on each page.
My whole intent in developing this iPad/Tablet methodology was to significantly reduce volunteer's work - which is a recruitment benefit - and eliminate paper. While the latter would be accomplished, the former would not, and in fact would tend to increase it. It's necessary to keep the first row - column headings - and the first column - the route identifier - from scrolling off the page, so that the volunteer won't have to keep scrolling up and down and right and left to know what the data are.
Conclusion: Comments are not supported on the iPad version of Numbers. Frozen headers are not imported from Excel but can be recreated easily.
I was previously directed to the Apple website http://www.apple.com/ipad/from-the-app-store/apps-by-apple/numbers.html which extols the wonders of the Numbers application. About halfway down the page there's a section regarding, "Sliders steppers and pop-ups". The web page states that pop-ups can be set up but, being a marketing site, gives no indication whatsoever as to how it's done. I was hoping someone could tell my if there's any way to carry them over from an Excel file. -
Read Text from HTML-Pages and want to solve "ChangedCharSetException"
Hello,
I have an app that connect via threads with pages and parse them an gives me only the Text-version of a HTML-page. Works fine, but if it found a page, where the text is within images, than the whole app stopps and gave me the message:
javax.swing.text.ChangedCharSetException
at javax.swing.text.html.parser.DocumentParser.handleEmptyTag(DocumentParser.java:169)
at javax.swing.text.html.parser.Parser.startTag(Parser.java:372)
at javax.swing.text.html.parser.Parser.parseTag(Parser.java:1846)
at javax.swing.text.html.parser.Parser.parseContent(Parser.java:1881)
at javax.swing.text.html.parser.Parser.parse(Parser.java:2047)
at javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:106)
at javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:78)
at aufruf.main(aufruf.java:33)So I tried to catch them with "getCharSetSpec()" and "keyEqualsCharSet( )" from the class "javax.swing.text.ChangedCharSetException" and hoped that this solved the problem. But still doesen't work...
Then I looked at the web and found, that I have to add the line:
doc.putProperty("IgnoreCharsetDirective", new Boolean(true));"doc." is a new HTML Dokument, created with the HTMLEditorKit. I do not have much knowledge about that and so I hope, that someone can explain me, how I can solve that problem, within my code.
Here we go:
import javax.swing.text.*;
import java.lang.*;
import java.util.*;
import java.net.*;
import java.io.*;
import javax.swing.text.html.*;
import javax.swing.text.html.parser.*;
public class myParser extends Thread
private String name;
public void run()
try
URL viele = new URL(name); // "name" ia a variable with a lot of links
URLConnection hs = viele.openConnection();
hs.connect();
if (hs.getContentType().startsWith("text/html"))
InputStream is = hs.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
Lesen los = new Lesen();
ParserDelegator parser = new ParserDelegator();
parser.parse(br,los, false);
catch (MalformedURLException e)
System.err.print("Doesn't work");
catch (ChangedCharSetException e)
e.getCharSetSpec();
e.keyEqualsCharSet();
e.printStackTrace();
catch (Exception o)
public void vowi(String n)
name = n;
}and for the case that it is important here is the class "Lesen"
import java.net.*;
import java.io.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
import javax.swing.text.html.parser.*;
class Lesen extends HTMLEditorKit.ParserCallback
public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos)
try
if ((t==HTML.Tag.P) || (t==HTML.Tag.H1) || (t==HTML.Tag.H2) || (t==HTML.Tag.H3) || (t==HTML.Tag.H4) || (t==HTML.Tag.H5) || (t==HTML.Tag.H6))
System.out.println();
catch (Exception q)
System.out.println(q.getMessage());
public void handleSimpleTag(HTML.Tag t,MutableAttributeSet a, int pos)
try
if (t==HTML.Tag.BR)
System.out.println(); // Neue Zeile
System.out.println();
catch (Exception qw)
System.out.println(qw.getMessage());
public void handleText(char[] data, int pos)
try
System.out.print(data); // prints the text from HTML-pages
catch (Exception ab)
System.out.println(ab.getMessage());
}Thanks a lot for helping...
Stephanparser.parse(br,los, false);
parser.parse(br,los, true); -
How do I extract text from an email?
Hello!
I am in the process of trying to automate orders from my website. How do I extract text from an email and paste it into specific cells in an Excel spreadsheet using Automator?
Many thanks,
Toby BatesonIf you select the message on the Inbox list, or open the message, you can then go to the Message menu of Mail and select Remove Attachments.
Bob N.
Mac Mini 1.5 GHz; iBook 900 mHz; iPod 20 GB Mac OS X (10.4.7) -
Hi,
How can we read texts from the Infotype. There is this function module HR_ECM_READ_TEXT_INFOTYPE, but we need the Employee Number, Begin date and End Date as inputs.
I just want to check if a field with a particular value exists or not.
just like this works to check whether the field DAT35 with value 99991231 exits or not.
SELECT PERNR FROM PA0035 INTO V_PERNR WHERE DAT35 = '99991231'.
IF SY-SUBRC = 0.
ENDIF.
the same way for a text, but this text actually gets stored in a structure thats why we cannot use a select for infotype
Thanks in advance.Hi,
What i am getting from ur explanation is that u are having a probelm in accessing a text field from the infotype, i.e: the value field in included in the infotype table (PA0035) but its text is in another table.
If this is the problem, u should first use select statement on PA0035 to get the required infotype record. Then use F1 help on the required text field on the infotype screen to get the table and field name. Then u can use select statement on that table by specifying the relavant value field from the previous select in the where clause.
Hope this hepls -
Setting number of rows and columns
How do I set the number of rows and columns of a table, say 2348 rows by 3 columns?
Then how do I quickly select the last row?
Also, if I enter a formula in row 1 column 2, how do I quickly copy that formula down to row 1435, or to the end of the column? Dragging seems slow and awkward.I wish to add a few words to Jerrold responce.
gjf12 wrote:
How do I set the number of rows and columns of a table, say 2348 rows by 3 columns?
Then how do I quickly select the last row?
Also, if I enter a formula in row 1 column 2, how do I quickly copy that formula down to row 1435, or to the end of the column? Dragging seems slow and awkward.
The process that you describe is inefficient.
The efficient one is :
create a table
enter the formulas in a single row
delete the rows below.
Now, each newly inserted row will contain the formulas.
From my point of view, it's when this is done that it will be interesting to apply a script adding rows.
Here is a script inserting rows.
--[SCRIPT insertRows]
Enregistrer le script en tant que Script : insertRows.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner une cellule au-dessous de laquelle vous voulez insérer des lignes.
menu Scripts > Numbers > insertRows
Le script vous demande le nombre de lignes désiré puit insère celles-ci.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
--=====
Save the script as a Script: insertRows.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select a cell below which you want to insert rows.
menu Scripts > Numbers > insertRows
The script ask you the number of rows to insert then it does the required insertion.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
Save this script as a … Script in the "Folder Actions Scripts" folder
<startupVolume>:Library:Scripts:Folder Action Scripts:
--=====
Yvan KOENIG (VALLAURIS, France)
2010/01/13
--=====
on run
set defaultValue to 100
if my parleAnglais() then
set myInteger to my askAnumber("Insert how many rows ?", defaultValue, "i")
else
set myInteger to my askAnumber("Combien de lignes voulez-vous insérer ?", defaultValue, "i")
end if
set {dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
repeat myInteger times
add row below row rowNum2
end repeat
end tell
end run
--=====
on getSelParams()
local r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2
set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
if r_Name is missing value then
if my parleAnglais() then
error "No selected cells"
else
error "Il n'y a pas de cellule sélectionnée !"
end if
end if
set two_Names to my decoupe(r_Name, ":")
set {row_Num1, col_Num1} to my decipher(item 1 of two_Names, d_Name, s_Name, t_Name)
if item 2 of two_Names = item 1 of two_Names then
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
else
set {row_Num2, col_Num2} to my decipher(item 2 of two_Names, d_Name, s_Name, t_Name)
end if
return {d_Name, s_Name, t_Name, r_Name, row_Num1, col_Num1, row_Num2, col_Num2}
end getSelParams
--=====
set {rowNumber, columnNumber} to my decipher(cellRef,docName,sheetName,tableName)
apply to named row or named column !
on decipher(n, d, s, t)
tell application "Numbers" to tell document d to tell sheet s to tell table t to return {address of row of cell n, address of column of cell n}
end decipher
--=====
set { d_Name, s_Name, t_Name, r_Name} to my getSelection()
on getSelection()
local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
tell application "Numbers" to tell document 1
repeat with i from 1 to the count of sheets
tell sheet i
set x to the count of tables
if x > 0 then
repeat with y from 1 to x
try
(selection range of table y) as text
on error errMsg number errNum
set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
return {theDoc, theSheet, theTable, theRange}
end try
end repeat -- y
end if -- x>0
end tell -- sheet
end repeat -- i
end tell -- document
return {missing value, missing value, missing value, missing value}
end getSelection
--=====
on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe
--=====
Asks for an entry and checks that it is an floating number
set myInteger to my askAnumber(Prompt, DefaultValue, "i")
set myFloating to my askAnumber(Prompt, DefaultValue, "f")
on askAnumber(lPrompt, lDefault, ForI)
local lPrompt, lDefault, n
tell application (path to frontmost application as string)
if ForI is "f" then
set n to text returned of (display dialog lPrompt & " (" & (1.2 as text) & ")" default answer lDefault as text)
try
set n to n as number (* try to convert the value as an number *)
return n
on error
if my parleAnglais() then
display alert "The value needs to be a floating number." & return & "Please try again."
else
display alert "La valeur saisie doit être un nombre décimal." & return & "Veuillez recommencer."
end if
end try
else
set n to text returned of (display dialog lPrompt default answer lDefault as text)
try
set n to n as integer (* try to convert the value as an integer *)
return n
on error
if my parleAnglais() then
display alert "The value needs to be an integer." & return & "Please try again."
else
display alert "La valeur saisie doit être un nombre entier." & return & "Veuillez recommencer."
end if
end try -- 1st attempt
end if -- ForI…
end tell -- application
Here if the first entry was not of the wanted class
second attempt *)
tell application (path to frontmost application as string)
if ForI is "f" then
set n to text returned of (display dialog lPrompt & " (" & (1.2 as text) & ")" default answer lDefault as text)
try
set n to n as number (* try to convert the value as an number *)
return n
on error
end try
else
set n to text returned of (display dialog lPrompt default answer lDefault as text)
try
set n to n as integer (* try to convert the value as an integer *)
return n
on error
end try -- 1st attempt
end if -- ForI…
end tell -- application
if my parleAnglais() then
error "The value you entered was not numerical !" & return & "Goodbye !"
else
error "La valeur saisie n’est pas numérique !" & return & "Au revoir !"
end if
end askAnumber
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) mercredi 13 janvier 2010 12:43:34 -
Localization of CrossTab row and column label Crystal Report RPT file
Dear all,
Does anyone know how to support multiple locale texts (English and French) in CrossTab Row and Column Header labels and grand total labels? Is there a way to parameterize text objects CrossTab in one single Crystal Report RPT file to use some sort of locale resource file containing text string for different languages based on the users of RPT at runtime? The idea is to use one single RPT file to generate report for different locale text for CrossTab Row and Column abels and grand total labels instead of creating RPT files per locale?Hi,
Does the database have a column that identifies the language? If it does, then you could create two separate cross-tabs and place them in different sections and conditionally suppress the section depending on the language from the database.
That's the only thing that can be done in my opinion.
-Abhilash -
Formulas results outside of row and column axis
The report has an area of row axis and column axis. This area is where the results from BW are displayed.
We have a requirement where we would have to create formulas using the BW Analyzer results of the row axis and column axis and display the results after the last row of this area.
For example, after the BW Analyzer displays the result area to the Excel, we are required to take Excel Cell D10 * C7 and put the results to B33.
<b>B33 = D10*C11</b>
Excel row 30 is the last row from the row axis result area.
I have searched through the forum for Cell Editor, but it seems that the requirement is to use 2 structures and use Cell Editor only when there is a formula collision. Our requirement has 1 structure, but I guess we can create the other structure for the column axis results. But still I think Cell Editor is a computation of formula collision within the row and column axis result area.
My question is will Cell Editor meet our requirement if we want to get formula results from the row and column axis and then display the results outside of the row and column axis result area?
Our approach was to use the Excel cell formulas in the workbook or possibly macros, but it seems that the Excel formulas will do.
Would someone clarify about the Cell editor for this requirement and how would you approach this?
Would this be effective to do the formulas from the query level? We are working on 3.5 SP11.Can Cell editor do the following:
1. Create structures
2. Run the query
3. The results of the structures are displayed in the row and column axis of the BEx Analyzer
4. Save as a workbook
5. Use the Cell Editor to pick and choose the cells (Not the Excel cells) to create formulas
6. The formula results are then displayed outside of the row and column axis.
Would this be another approach?
What scenario can Cell editor be used? What scenario can Cell editor not be used?
Thanks -
Goto row and column in a JTextArea
Does anybody here know the correct procedure to get to a specific row and column in a JTextArea? I want to be able to do something like this:
replace(char c, int row, int column) - where the original character at row,column will be replaced with c.
I know that in C++, there is a windows console library that lets u do this, but there isn't one in java so I'm trying to get around it using a JTextArea.
Thank you.
Any Help/Comments/Ideas will be greatly appreciated.
-PatrickJTextArea has a replaceRange method.
John -
How to read text from a web page
I want to read text from a web page. Can any body tell me how to do it.
Ok i tell you detail. visit the site " http://seriouswheels.com/" you will a index from A to Z which are basically car name index i want to read each page get car name and its model and store it in data base. I you can provide me the code i will be very thankful.
-
How can I read text files from LAN if I only know the hostname?
I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
<p>1. How can I read text files from LAN if I only know the hostname, or IP address?
<p>2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.
(ex. how can I read the 120th line?)
<p>Please help!
<p>sorry for the bad englishI'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
1. How can I read text files from LAN if I only know the hostname, or IP address?You need to know the URL of the file. You need to know the hostname, port, protocl and relative path.
The hostname is server, not file.
2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.Use the seek() to get to a random byte.
(ex. how can I read the 120th line?)The only way to find the 120th line is to read the first 120 lines. You can use other file formats to find the 120th line without reading the whole file but to need to be able to detremine where the 120th line is -
How can we read filenames from a specific folder
Hi forum,
I have a situation that, there are several files coming daily in a specific folder.
I want to read filenames from that folder and want to get that filename in a variable.
That filename contains account nos. which I need for further processing.
Now, how can we read filenames from a specific folder with using Oracle PL/SQL Procedure?
Please suggest.
Thanks & regards,
KiranIf you are on 10g (not sure which exact release I'm afraid) you might look at Chris Poole's XUTL_FINDFILES that lists the files in a directory using PL/SQL and DBMS_BACKUP_RESTORE.SEARCHFILES (all a bit undocumented as it seems to be provided as part of rman).
The conventional (i.e. supported) approach is to use a Java stored procedure - there is an example on AskTom.
Message was edited by:
William Robertson -
How do I delete text from a textArea?
How do I delete text from a textArea? I basically want the opposite of append(String)... I want something that removes a line from my TextArea. Anyone know?>
If you want to remove only a specific part of the text, you have to get the String, take the parts before and after the removed part, append them back together and use setText to replace it in the textArea.
Maybe you are looking for
-
Windows no longer detecting my Audigy 4?(Non-P
Hey all. I've had my Audigy 4 (non-Pro) installed and working super for about 50 days, but it started giving me a weird problem. Windows was no longer detecting the card! It was weird. DX Diag, programs like EVEREST... they all report no sound card w
-
Strange behaviour when placing text frame on top of image
Hi, Win XP, FM 8.04 I have a front cover that consists of a TIF image that bleeds off the page. On top of that image I want to put a text frame with the book title. The strange thing is that when I create the text frame and use the toolbar buttons to
-
Help required on extracting information from Forum
Hi All, We have a requirement for a KM initiative to extract below information from Forum 1)User's Q&A Threads from Oracle Forums. 2)User's Tag [From Aria] related threads from Oracle Forums Can some please provide some input/pointers on how data can
-
Using CS5 extended and Lightroom 5
Hi, Using Photoshop CS5 and Lightroom 5, will RAW (NEF) files from Nikon D7100 be supported? Or do I need to upgrade to CS6? Thank you!
-
'Batch Change' question - Need to adjust month only...
Hi, I've got a question about using Batch Change. A good portion of my photos have the right Day and Time, however they are one month off. Is there any way that I can change only the month using Batch Change, or am I stuck? Perhaps there is another w