Button values in dynamic columns and rows
Hi,
I am working on webpage that allows the user to dynamically browse a database. I already did this as an applet and was asked to convert it to server-side intensive. Thus began my adventure into JSP and servlets.
The problem i am having is that at some point a table is generated with a number of columns having submit buttons instead of just text. I want to get the column number and the value of the button that user clicks and use it in my servlet.
Can anyone suggest a way to do this ?
My current train of thoughts is to attach the column index to the name of the button and use javascript's onclick to call a function to set a hidden parameter. I am a novice to javascript - will it be possible to pass the name attribute of the button to the function ?
Also, can I use jsp tags inside the javascript function ?
TIA
-Harry
Below is the code for generating the page.
<jsp:useBean id="tableData" scope="session" class="beans.TableBean" />
<table border="1">
<% int columnCount = tableData.getColumnCount(); %>
<% int rowCount = tableData.getRowCount(); %>
<tr align="center">
<%for(int i=0; i < columnCount; i++)
{%>
<td>
<%= tableData.getColumnTitle(i) %>
</td>
<%}%>
</tr>
<% for(int i=0; i<rowCount;i++)
{%>
<tr>
<%for(int j=0; j<columnCount; j++)
String val = tableData.getValueAt(i,j);
%>
<td>
<%if(tableData.isDrill(j))
%>
<input type="submit" name="<%=val%>" value="<%=val%>" >
<%}
else
{%>
<%=val %>
</td>
<%}
}%>
</tr>
<%}%>
</table>
Is there other data being passed to the servlet also... by the looks of the code you're using now, there isn't. If this is the case, why bother with submit buttons? You can just use an HTML button, and link it to the servlet passing the information you need, sending your column numbers as parameters inside the url,
<input type="button" value="<%=val%>" onClick="window.location.href='myServlet?col=<%=j%>&val=<%=val%>';"
Similar Messages
-
How to insert parameter value into multiple columns and rows
Hi All,
I have one procedure insert_tab and I am passing
100~101~102:103~104~105:106~107~108 as a parameter to that procedure. I wanted to insert each numeric value into one column. The output of the table should contain
Table:
Col1 Col2 Col3
100 101 102
103 104 105
106 107 108
Awaiting for your reply..That's not more clear for me...
Anyway, if you really want a procedure for that, try :
SQL> create table tblstr (col1 number,col2 number,col3 number);
Table created.
SQL>
SQL> create or replace procedure insert_fct (p_string IN varchar2)
2 as
3 v_string varchar2(4000):=p_string||':';
4 v_substring varchar2(4000);
5
6 begin
7 while instr(v_string,':') > 0 loop
8 v_substring := substr(v_string,1,instr(v_string,':')-1)||'~';
9 insert into tblstr(col1,col2,col3)
10 values (substr(v_substring,1,instr(v_substring,'~',1,1)-1),
11 substr(v_substring,instr(v_substring,'~',1,1)+1,instr(v_substring,'~',1,2)-instr(v_substring,'~',1,1)-1),
12 substr(v_substring,instr(v_substring,'~',1,2)+1,instr(v_substring,'~',1,3)-instr(v_substring,'~',1,2)-1));
13 v_string:=substr(v_string,instr(v_string,':')+1);
14 end loop;
15 end;
16 /
Procedure created.
SQL>
SQL> show err
No errors.
SQL>
SQL> select * from tblstr;
no rows selected
SQL> exec insert_fct('100~101~102:103~104~105:106~107~108')
PL/SQL procedure successfully completed.
SQL> select * from tblstr;
COL1 COL2 COL3
100 101 102
103 104 105
106 107 108
SQL> exec insert_fct('109~~')
PL/SQL procedure successfully completed.
SQL> exec insert_fct('~110~')
PL/SQL procedure successfully completed.
SQL> exec insert_fct('~~111')
PL/SQL procedure successfully completed.
SQL> select * from tblstr;
COL1 COL2 COL3
100 101 102
103 104 105
106 107 108
109
110
111
6 rows selected.
SQL> Nicolas. -
How to calculate value from perticular column and row in pivot table
Hi all,
I am having following pivot table.
Country
A
B
C
D
F
G
H
J
K
L
M
Grand Total
Canada
1
1
3
3
12
14
13
97
China
8
4
3
19
India
2
47
448
176
395
3656
1964
1360
8077
USA
1545
352
380
26
10
4
8
32
2054
1023
758
4624
UK
12
19
13
23
33
298
Grand Total
1545
352
381
29
72
474
184
427
5743
3028
2167
13114
Now I want sum of Columns A, B, C, K, M where Country = India in one field.
and sum of D, F, g in another field. and sum of remainig columns in another field.
How can i get sum of values with some where condition in pivot table.
Thanks,Hi Michael,
Following is the representation which i want
CouRntry
ROW LABLES
A
B
C
Total of
ABC
F
G
Total
Of FG
J
K
L
TOTAL
of JL
Grand
Total
Canada
1
1
3
3
12
14
13
97
China
8
4
3
19
India
2
47
448
176
395
3656
1964
1360
8077
USA
1545
352
380
26
10
4
8
32
2054
1023
758
4624
UK
12
19
13
23
33
298
Grand Total
1545
352
381
29
72
474
184
427
5743
3028
2167
1
Also if i get sum how can i add a column in between of the fields.
Thanks -
How can we get Dynamic columns and data with RTF Templates in BI Publisher
How can we get Dynamic columns and data with RTf Templates.
My requirement is :
create table xxinv_item_pei_taginfo(item_id number,
Organization_id number,
item varchar2(4000),
record_type varchar2(4000),
record_value CLOB,
State varchar2(4000));
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
select * from xxinv_item_pei_taginfo;
Item id Org Id Item Record_type Record_value State
493991 224 1265-D30 USES fever TX
493991 224 1265-D30 HOW TO USE one tablet daily TX
493991 224 1265-D30 SIDE EFFECTS XYZ TX
493991 224 1265-D30 DRUG INTERACTION ABC TX
493991 224 1265-D30 OVERDOSE Go and see doctor TX
493991 224 1265-D30 NOTES Take after meal TX
Above is my data
I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
its a BI Publisher report.
please suggestif you have data in db then you can create xml with needed structure
and so you can create bip report
do you have errors or .... ? -
How to get the current selected column and row
Hi,
A difficult one, how do i know which column (and row would also be nice) of a JTable is selected?
e.g.
I have a JButton which is called "Edit" when i select a cell in the JTable and click the button "Edit" a new window must be visible as a form where the user can edit the a part of a row.
Then the column which was selected in the JTable must be given (so i need to know current column) and then i want the TextField (the one needed to be edited) be active with requestFocus(). So it would be
pricetextfield.requestFocus();
Problem now is that i have to click every time in the window the JTextField which was selected in the JTable. I have chosen for this way of editing because my application is multi-user and it would be too difficult for me when everybody did editing directly (catch signals, reload data, etc.).
My question is how do I know the current column and the current row in a JTable?I'm not sure what your mean by the "current" row or column, but the following utility methods return
which row and column have focus within the JTable.
public static int getFocusRow(JTable table) {
return table.getSelectionModel().getLeadSelectionIndex();
public static int getFocusColumn(JTable table) {
return table.getColumnModel().getSelectionModel().getLeadSelectionIndex();
} -
Read words from text file by delimiter as columns and rows
Hi All,
I need your help as i have a problem with reading string by delimiter. i have used various tech in java, but i can not get the result as expected.
Please help me to get the string from text file and write into excel . i have used a text file.
problem
get the below as string by delimiter
OI.ID||'|'||OI.IDSIEBEL||'|'||OI.IDTGU||'|'||OI.WORKTYPE||'|'||OI.UTR_FK
read the below as string by delimiter
"50381|TEST_7.15.2.2|09913043548|Attivazione|07-SEP-10
now i need to write the above into excel file as columns and rows.
there are 5 columns and each corresponding values
the outut excel should be
OI.ID OI.IDSIEBEL OI.IDSIEBEL OI.WORKTYPE OI.UTR_FK
50381 TEST_7.15.2.2 09913043548 Attivazione 07-SEP-10
i tried in diffrerent techinq but not able to get the resule. pls help me
Thanks,
Jasmin
Edited by: user13836688 on Jan 22, 2011 8:13 PMFirst of all, when posting code, put it between two tags.
Second of all, the pipe is a special character in regex, so you need to escape it as
.split("\ \|");
Erh. So 2 backslashes before the pipe character. Stupid forum won't post it.
Edited by: Kayaman on Jan 24, 2011 9:35 AM
Edited by: Kayaman on Jan 24, 2011 9:35 AM
Edited by: Kayaman on Jan 24, 2011 9:36 AM -
How to get warning by using the previous value of the column and new value
Hi all,
Suppose the column A has the true and when I click on button which also sets the value of the column as true I should dispaly warning that column a is already true.How can I achieve this.How to store the original value of the column and then check wirth the new value.
Thanks in advance.You dont have to store the value anywhere
You can do this from setMethod of EOImpl.java
eg:
void setAttributeXXX(String Value)
// value contains new value
// getAttributeXXX() contains oldValue
if (value.equals(getAttributeXXX()))
// Verify value is > 0 if (value.compareTo(0) <= 0)
throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT, // indicates EO source
getEntityDef().getFullName(), // entity name
getPrimaryKey(), // entity primary key
"AttributeXXX", // attribute Name
value, // bad attribute value
"AK", // nessage application short name
"FWK_TBX_T_EMP_SALARY_REQUIRED"); // message name
setAttributeInternal(AttributeXXX, value);
--Prasanna -
Can we hide the lines between the columns and rows of an alv in wd abap
HI all ,
I know that we can colour cell/column/row in an alv in wd abap.
but, can we hide the lines between the columns and rows of an alv in wd abap.
i have checked this link [hiding lines b/n rows and columns of an alv|http://help.sap.com/saphelp_nw04/helpdata/en/91/e7eb40c4f8712ae10000000a155106/content.htm]
but didn't understand, can please anybody provide some example or any material..? it will be very helpful.
THANK YOU.
Edited by: arfat111 on Feb 15, 2010 7:05 AMCode some like this in the WDDOINIT method of your view which defines the ALV component as used component.
instansiate the ALV component
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_usage_alv().
if lo_cmp_usage->has_active_component() is initial.
lo_cmp_usage->create_component().
endif.
data lo_interfacecontroller type ref to iwci_salv_wd_table.
lo_interfacecontroller = wd_this->wd_cpifc_usage_alv().
data lo_value type ref to cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model().
hide the grid lines
lo_value->if_salv_wd_table_settings~SET_GRID_MODE( value = '01' ).
Thanks,
Abhishek -
Avoiding zeros in columns and rows after selecting parameters
Hi,
I have a parameter on my report, after selecting certain value it shows me Zero Zero for all the columns and rows that do not satisfy the parameter selected and shows data in rows nad columns whre it is matching.
Is there any way to just avaid getting anything for the rows and columns that are not matching and just getting data rows and columns......like a compact form.
I hope I was able to explain my question.
RobinnPlease re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551 -
FREEZE COLUMNS AND ROWS IN WEB REPORT - PLEASE ADVISE ME
Hi Experts,
I have a web template that contains a query. My customer wants to freeze columns and rows in this report like we do in Excel. I know that in BW 3.5 this is not a standard feature of Table item. In forum I have found some messages regarding with this issue. I inserted a JavaScript code that I have found in forum, but this does not help. A codewriter wrote some other JaveScript for example alert(), that works but some part of taken code from forum such as defined functions do not work.
Other solutions advised in forum such as fixing row numbers or column numbers do not fix my problem.
My questions:
1 - In new version of BW, BI 7.0 have this issue with WAD in standard been solved?
2 - Does it really possible at the same time rows and columns to freeze? I want to freeze 2 rows from top, 2 columns from left.
Could anyone have an idea?
Best regards,
SongulHello,
This will be implemented with SPS13.
https://websmp204.sap-ag.de/~sapidb/011000358700004483762006E
And before SPS13, i frame is useful to realize what you want to do. Using 2 "Analysis" web item. and display of 1st analysis web item is restricted only thin the header of the table and the 2nd Analysis web item is used as "table". display of this "analysis" is also restricted to 10 - 30 rows.
but this consume hardware resource.
<sample>
<div style="OVERFLOW: auto; WIDTH: 1000px; HEIGHT: 20px" >
<bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_2" designwidth="400" designheight="20" >
<bi:DATA_PROVIDER_REF value="DP_1" />
<bi:NEW_LINES_COUNT value="0" />
<bi:NEW_LINES_POSITION value="TOP" />
<bi:DATA_ROW_FROM value="1" />
<bi:DATA_ROW_TO value="0" />
</bi:ANALYSIS_ITEM>
</div>
<div style="OVERFLOW: auto; WIDTH: 1000px; HEIGHT: 200px" >
<bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_1" designwidth="400" designheight="200" >
<bi:DATA_PROVIDER_REF value="DP_1" />
<bi:DATA_COLUMN_FROM value="1" />
<bi:DATA_ROW_TO value="0" />
</bi:ANALYSIS_ITEM>
</div>
Kind regards,
Masaaki -
Transpose columns and rows in numbers
I need to transpose columns and rows in Numbers and I do not want to write script to do it. Is there an easier way?
Give me a proper transpose and I will uninstall Excel and never look back.
Ok, here's a proper transpose, that can be placed in an Automator Service so it becomes a simple menu pick as below (and can also be assigned a keyboard shortcut).
To use it (this is slightly different from Excel) you select the range you want to transpose, choose Copy Transpose, click a destination cell in an existing table in the current document or another document, and command-v (Edit > Paste) or option-shift-command-v (Edit > Paste and Match Style).
The one-time setup is as follows. In Automator choose File > New > Service, drag a Run AppleScript action from the left into the right pane, choose 'No Input' for 'Services receives selected' and 'Numbers' for 'in'. Then paste the following into the Run AppleScript action, replacing all text already there by default:
--Transpose - select range, run, paste transposed values where wanted
try
tell application "Numbers" to tell front document to tell active sheet
set selected_table to first table whose class of selection range is range
tell selected_table
set my_selection to the selection range
set first_col to address of first column of my_selection
set last_col to address of last column of my_selection
set first_row to address of first row of my_selection
set last_row to address of last row of my_selection
set str to ""
repeat with i from first_col to last_col
repeat with j from first_row to last_row
set str to str & (value of cell j of column i of selected_table) & tab
end repeat
set str to str & return -- add line return after row
end repeat
end tell
end tell
set the clipboard to str
display notification "Ready to paste transposed values" with title "Numbers"
on error
display dialog "Select a range first and then try again"
end try
--end script
Hit the compile "hammer" and the script should indent properly. Then save the service with the name you want to appear in your menu, and it will thereafter be available via the Services menu (and keyboard shortcut, if you set one up in System Preferences > Keyboard > Shortcuts > Services).
That's it. Less then five minutes' one-time set-up work and you've got a menu pick for a transpose functionality that is as convenient as Excel's.
SG -
Hi all,
I'm just filling a Numbers table from a webseite per copy & paste.
Can I swap columns and rows in Numbers like in Quantrix?
AxelHere is a new transpose script.
This one inserts formulas grabbing the contents of the original block so the transposed one reflects the changes which may be done in the original block.
It's a bit long but I post it here because it introduce some handlers allowing us to acess some interesting features.
--[SCRIPT transposeLive]
Enregistrer le script en tant qu'Application ou Progiciel : transposeLive].app
déplacer l'application créée 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.
Merci à Scott Lindsey & Ed.Stockly du forum [email protected]
qui m'ont aidé à construire le code récupérant le bloc sélectionné.
Sélectionnez le bloc de cellules à transposer
menu Scripts > Numbers > transposeLive (exécute le script une première fois)
Le script récupère les informations utiles sur le bloc à transposer
Sélectionner la première cellule du bloc destination
(elle ne peut être dans le bloc source)
menu Scripts > Numbers > transposeLive (exécute le script une deuxième fois)
Il insère des formules récupérant le contenu du bloc transposé.
Les modifications au contenu du bloc source seront répercutées.
+++++++
Save the script as an Application or an Application Bundle: transposeLive].app
Move the newly created application 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.
Thanks to Scott Lindsey & Ed.Stockly from [email protected]
which helped me to build the code grabbing the selected range.
Select a group of cells.
menu Scripts > Numbers > transposeLive (Run the script once.)
It grabs infos about the selection
select the first cell of the destination
(can't be in the source range)
menu Scripts > Numbers > transposeLive (Run the script one more time.
It will insert formulas grabbing the transposed range.
Changes in the source one will be reflected.
Yvan KOENIG (Vallauris, FRANCE)
19 janvier 2009
property theApp : "Numbers"
property sourceCell : missing value
property sourceTable : missing value
property sourceSheet : missing value
property nbRows : missing value
property nbColumns : missing value
--=====
on run
set firstPass to sourceCell = missing value
if firstPass then (*
Here we are in the first pass.
We grab infos about the source range *)
set {rName, sourceTable, sourceSheet, dName} to my getSelection()
if rName is missing value then error "No selected cells"
set twoNames to my decoupe(rName, ":")
if sourceTable does not start with "'" then set sourceTable to "'" & sourceTable & "'"
if sourceSheet does not start with "'" then set sourceSheet to "'" & sourceSheet & "'"
set sourceCell to item 1 of twoNames
set {colNum1, rowNum1} to my decipher(item 1 of twoNames)
if item 2 of twoNames = item 1 of twoNames then
set {colNum2, rowNum2} to {colNum1, rowNum1}
else
set {colNum2, rowNum2} to my decipher(item 2 of twoNames)
end if
set nbRows to rowNum2 + 1 - rowNum1
set nbColumns to colNum2 + 1 - colNum1
else --**************
Here we are in the second pass
We insert formulas grabbing the transposed cells *)
set deci to character 2 of (0.5 as text)
if deci is "." then
set delim to ","
else
set delim to ";"
end if
set p2lproj to my getLproj(theApp)
set OFFSET_loc to my getLocalizedFuncName(p2lproj, "OFFSET")
--set ADDRESS_loc to my getLocalizedFuncName(p2lproj, "ADDRESS")
--set INDIRECT_loc to my getLocalizedFuncName(p2lproj, "INDIRECT")
set {rName, tName, sName, dName} to my getSelection()
if rName is missing value then error "No selected cells"
set twoNames to my decoupe(rName, ":")
set {colNum1, rowNum1} to my decipher(item 1 of twoNames)
if item 2 of twoNames = item 1 of twoNames then
set {colNum2, rowNum2} to {colNum1, rowNum1}
else
set {colNum2, rowNum2} to my decipher(item 2 of twoNames)
end if
(* Here we know the starting point of the destination area. *)
tell application theApp
activate
tell document dName to tell sheet sName to tell table tName
set rowsCible to (get row count)
set rowsNeeded to rowsCible - 1 + nbColumns
if rowsNeeded > rowsCible then
repeat (rowsNeeded - rowsCible) times
add row below row rowsCible
end repeat
end if -- rowsNeeded
set columnsCible to (get column count)
set columnsNeeded to columnsCible - 1 + nbRows
if columnsNeeded > columnsCible then
repeat (columnsNeeded - columnsCible) times
add column after column columnsCible
end repeat
end if -- columnsNeeded
repeat with i from 1 to nbRows
repeat with j from 1 to nbColumns
set value of cell (colNum1 - 1 + i) of row (rowNum1 - 1 + j) to "=" & OFFSET_loc & "(" & sourceSheet & " :: " & sourceTable & " :: " & sourceCell & delim & i - 1 & delim & j - 1 & ")"
end repeat
end repeat
end tell -- table of sheet of document
end tell -- Application
set sourceCell to missing value
set sourceTable to missing value
set sourceSheet to missing value
set nbRows to missing value
set nbColumns to missing value
end if
end run
--=====
on getSelection()
local mySelectedRanges, sheetRanges, thisRange, _, myRange, myTable, mySheet, myDoc, mySelection
tell application theApp
activate
tell document 1
set mySelectedRanges to selection range of every table of every sheet whose it is not missing value
repeat with sheetRanges in mySelectedRanges
try
count of sheetRanges
on error
set sheetRanges to {sheetRanges}
end try
repeat with thisRange in sheetRanges
if contents of thisRange is not missing value then
try
--return thisRange --poorly formed result
thisRange as text
on error errMsg number errNum
set {_, myRange, _, myTable, _, mySheet, _, myDoc} to my decoupe(errMsg, quote)
--set mySelection to (a reference to (range rn of table tn of sheet sn))
return {myRange, myTable, mySheet, myDoc}
end try
end if -- contents…
end repeat -- thisRange
end repeat -- sheetRanges
end tell -- document 1
end tell -- application
return {missing value, missing value, missing value, missing value}
end getSelection
--=====
on decipher(n)
local letters, colNum, rowNum
set letters to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
if (character 2 of n) as text > "9" then
set colNum to (offset of (character 1 of n) in letters) * 64 + (offset of (character 2 of n) in letters)
set rowNum to (text 3 thru -1 of n) as integer
else
set colNum to offset of (character 1 of n) in letters
set rowNum to (text 2 thru -1 of n) as integer
end if
return {colNum, rowNum}
end decipher
--=====
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
--=====
on getLproj(a)
local lprojs, localId, lproj
set lprojs to {{"da_DK", "da.lproj"}, {"nl_NL", "Dutch.lproj"}, {"en_US", "English.lproj"}, {"fi_FI", "fi.lproj"}, {"fr_FR", "French.lproj"}, {"de_DE", "German.lproj"}, {"it_IT", "Italian.lproj"}, {"ja_JP", "Japanese.lproj"}, {"ko_KR", "ko.lproj"}, {"no_NO", "no.lproj"}, {"pl_PL", "pl.lproj"}, {"pt_BR", "pt.lproj"}, {"pt_PT", "pt_PT.lproj"}, {"ru_RU", "ru.lproj"}, {"es_ES", "Spanish.lproj"}, {"sv_SE", "sv.lproj"}, {"zf_CN", "zh_CN.lproj"}, {"zh_TW", "zh_TW.lproj"}}
set localId to my getLocale(a, "http://support.apple.com/en_US/manuals/#iwork")
set localId to text (1 + (count of "http://support.apple.com/")) thru -1 of localId
set localId to text 1 thru ((offset of "/" in localId) - 1) of localId
set lproj to ""
repeat with i from 1 to count of lprojs
if localId is item 1 of item i of lprojs then
set lproj to item 2 of item i of lprojs
exit repeat
end if
end repeat
if lproj = "" then error "A Frameworks file is missing !"
return (path to application support as text) & "iWork '09:Frameworks:SFTabular.framework:Versions:A:Resources:" & lproj
end getLproj
--=====
on getLocale(a, x)
tell application a to return localized string x
end getLocale
--=====
on getLocalizedFuncName(f, x)
return localized string x from table "Localizable" in bundle file f
end getLocalizedFuncName
--=====
--[/SCRIPT]
Yvan KOENIG (from FRANCE lundi 19 janvier 2009 18:57:48) -
I have a spreadsheet. Latitudes are across row 1. Latitudes are across row A. The
lower case letters are values of some function. I would like to delete all the columns and rows in the spreadsheet except for those that are closest to .00, .25,.50, .75.
For example, this
A
B
C
D
E
1
-91.5125
-91.5042
-91.4959
-91.4875
2
42.52124
a
b
c
d
3
42.5129
e
f
g
h
4
42.50457
i
j
k
l
5
42.49624
m
n
o
p
would turn out to this...
A
B
1
-91.4959
2
42.49624
o
How would I go about doing so?Thanks Jerry,
sure wish this was easy to access in the help menu or on the web. not burried deep in a huge manual that is burried deep in the website.
For others who might read this, the corner square is called a "Table Handle"
The A, B, C row is called "Reference tab letters" and can be used to refer to columns.
The 1, 2, 3 column is called "Reference tab numbers" and can be used to refer to rows.
http://manuals.info.apple.com/en_US/Numbers09_UserGuide.pdf -
Transpose columns and rows / Switch columns and rows
Hello,
Is it possible to interchange columns and rows in order to create a left-to-right scrolling table instead of a top-to-bottom scrolling one?
In detail:
I have this:
| col 1 | col 2 | col 3
row 1 | | |
row 2 | | |
row 3 | | |
... | | |
...and want to have this:
| row 1 | row 2 | row 3 | ...
col 1 | | | |
col 2 | | | |
col 3 | | | |
Does anyone know if this is possible with the standard table or the ALV?
Thanks in advance & Kind regards,
RobertHi,
So there is no easy solution by just setting a flag in the ALV config!? ...too bad!
As for the dynamic creation:
Would there be an issue with different data types in one "column" (former row)? As a matter of fact there probably will be a mix of character, numbers, ...
Regards,
Robert -
How to fix skewed table columns and rows after re-import XML
My question is regarding XML Import in InDesign CS3.
I have a XML that has a table of 5 columns and 5 rows, when I import it into InDesign, the table shows up fine with 5 columns and 5 rows. However when I revise my table to have an additional column, and re-import the XML file, the table gets updated, but instead of with an additional column, it gets 'appended' with an additional row instead (InDesign seems to blindly replace each cell from left to right, top to bottom, and ends up with 6 rows instead). The XML file specifies the number of columns and rows (5 and 5 before, 5 and 6 after), why doesn't InDesign recognize it and automatically add a new column when I re-import the file? Is this problem fixed in CS5.5? Is there a script to fix this?
Here is an example of my old XML vs new XML:
Old:
<frame5>
<Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table" aid:trows="5" aid:tcols="5">
<Cell aid:table="cell" aid:crows="1" aid:ccols="1"></Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2006</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2005</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2004</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2003</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Stores at beginning of period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">846</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">805</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">753</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">678</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Stores opened during the period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">36</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">50</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">59</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">79</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Stores closed during the period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">13</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">9</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">7</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">4</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Total stores at end of period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">869</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">846</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">805</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">753</Cell>
</Table>
</frame5>
New:
<frame5>
<Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="5" aid:tcols="6">
<Cell aid:table="cell" aid:crows="1" aid:ccols="1"></Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2007</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2006</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2005</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2004</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">2003</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Stores at beginning of period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">123</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">846</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">805</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">753</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">678</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Stores opened during the period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">456</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">36</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">50</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">59</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">79</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Stores closed during the period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">789</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">13</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">9</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">7</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">4</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">Total stores at end of period</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">1368</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">869</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">846</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">805</Cell>
<Cell aid:table="cell" aid:crows="1" aid:ccols="1">753</Cell>
</Table>
</frame5>What I mean is, right now there is a "workaround" which requires a user to manually add an extra column before re-importing the XML (with an extra column), otherwise the results get skewed. If by providing a script we can simply ask the user to "run" it, it would be a more "acceptable" solution.
Right. So, one solution would be to use Convert Text to Tables. If you find that works for you, then you can script it.
That's why I asked you...
Of course if nothing is required from the user other than simply re-importing, then that would be the best solution.
Well, one could imagine a script that was attached to the re-import command, or to the link update notification, but probably the first step is to get something that works reasonably well without automating it completely. Especially because triggers to run scripts silently can introduce hard-to-debug problems.
Sure we can switch to use "CALS table and see if this works. The question is, why should we need to? In the 2nd XML there is clearly a different "aid:tcols" value, and yet InDesign seems to ignore it and assume the same # of columns? This sounds like an Indesign bug, can someone confirm? Is there any plans to fix this?
Not to be snarky, but do you want it to work or not? There are the tools you have and the tools you wish you had, and you can't really do much with the ones you wish you had. I'm kind of assuming you are looking for a solution today, not a solution in 2013.
Yes, I believe two of us have confirmed this appears to be a bug.
Plans to fix? Well, we can't really tell you. You could try asking Adobe, but that's not easy information to get out. But you can certainly open a support case at http://adobe.com/go/supportportal and ask. It's not like we have special information here...
But you're probably better off filing a bug first, in that same fashion.
But let's assume no one had filed the bug. CS6 is expected in the March/April 2012 timeframe. That means that they're probably just putting the finishing touches on it right now, and it's going to be very difficult to fix things in it now. So then the earliest you'd likely get it fixed in CS6.5/CS7/whatever which presumably comes out by 2Q2013, and that's assuming Adobe decides to fix it...
I also can't find much documentation on how to update my table to a "CALS table", any examples?
Try this thread:
Re: Importing a CALS table into InDesign CS3
Maybe you are looking for
-
Blue Screen of Death & disk0s2: I/O error
Hi My Mac just slowed down suddenly yesterday, then when I tried to reboot, it went to grey screen Apple logo & spinning ball for ages, then stalled on blue screen. I tried the following: 1. Ran Applejack 3 times on auto - said "errors repaired" or "
-
How to set folder icon image in OS X Lion?
I set my folder's icon image in OS X Leopard before, but I don't know how to do that in Lion. In Leopard you simply copy the icon image from an Info window of a file, and paste that into the folder's icon image in the top left corner of its Info win
-
How do I print a list albums sorted by artist
iTunes 12.1.2.27 Windows 7 SP 1 (64 bit) I would like to generate a list of albums in my library sorted by artist. This used to work fine before I upgraded to iTunes 12 last fall by using File > Print > Album listing / Theme: List of albums. Since
-
Generating PL/SQL with invoker's rights?
When will this functionality be available in Designer? We are currently running Designer 10g (9.0.4.3.14) and this functionality is not supported yet. We would very much like to be able to generate packages with "AUTHID CURRENT_USER" from the server
-
How to make replacement of MIC in Task Lists
Hi all, My client have uploaded incorrect MICs in Task List and in Routing. How to do a Mass Change. Is there any pre requisite for doing the mass changes. Please guide. Thnx in advance Sam