How to transfer worksheet names to columns
I want to loop through all the sheets in workbook and transfer the name of each to a column. Any suggestions?
Hi egrantz,
For this requirement, you could retrieve current workbook’s all sheets form
Workbook.Sheets property. Then iterate these sheets and get the name.
Dim i As Long
Dim s As Object
For Each s In ActiveWorkbook.Sheets
i = i + 1
Cells(i, 1) = s.Name
Next
Regards
Starain
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
How to change the "name of column" property of an text item in runtime?
How to change the "name of column" property of an text item in runtime?
I look the properties of items in help and found nothing about this!
It's possible?Hi,
an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
First create block and add items
The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
Set into items the column name property to col1 , col2 ...
At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
in this way you can change the source of column value.
Caution because if you change value type from varchar2 to date you must cast date into varchar2.
May be that this way is valid only for view data not for insert-update, i don't remember.
bye
Message was edited by:
Killernero -
How to change the name of column in ActionScript?
I possibly know how to change the name of the column in DataGrid using mxml but dont know how to change the name of column in DataGrid using ActionScript.
var newDataGrid:DataGrid=new DataGrid();
newDataGrid.dataProvider=arrayCollection():
It takes the default names from arraycollection but I wanted to give any column names which I want through ActionScript.
Please HELP!Give your datacolumn and id. Then set the property for that column through the datacolumn id.
DataGridColumn id="nameDC"
Script:
nameDC.headerText = "Name"; -
How to find worksheet name from EUL5* tables.
Hi
I created workbook called employee report.
under that 3 worksheets created.
worksheet1 - By EMPNO
worksheet2 - By DEPTNO
worksheet3 - By JOB.
how can i find the worksheet name from the EUL5* tables?Hi Marias,
To find the worksheets run the below query
select distinct qs_doc_name WBOOK_NAME,qs_doc_details WSHEET_NAME
from eul5_qpp_stats where qs_doc_name in(select doc_name from EUL5_documents)
Regards
Sridhar -
How to compare index names and columns from different user?
I am using below query to compare two indexes from 2 different users but even though index name and columns are same... result shows me they are different.. what I am doing wrong? Thanks
WITH t AS
(SELECT COUNT (DISTINCT index_owner || index_name || indexed_cols)
cnt
FROM ( SELECT index_owner,
index_name,
listagg (column_name, ',')
WITHIN GROUP (ORDER BY column_position)
indexed_cols
FROM dba_ind_columns
WHERE index_name='XPKTBL_A'
GROUP BY index_owner, index_name))
SELECT CASE
WHEN cnt > 1 THEN 'Indexes are different'
WHEN cnt = 0 THEN 'Indexes dont exist'
WHEN cnt > 1 THEN 'Indexes are identical'
END
commnt
FROM t
Result:
Indexes are different
but Actually if you check below they are same After when I run this query:
SELECT index_owner,
index_name,
listagg (column_name, ',') WITHIN GROUP (ORDER BY column_position)
indexed_cols
FROM dba_ind_columns
WHERE index_name='XPKTBL_A'
GROUP BY index_owner, index_name;
Result:
Index_owner
Index_name
Index_cols
USER1
XPKTBL_A
FIELD_A1
USER2
XPKTBL_A
FIELD_A1Hi,
Erhan_toronto wrote:
I am using below query to compare two indexes from 2 different users but even though index name and columns are same... result shows me they are different.. what I am doing wrong? Thanks
WITH t AS
(SELECT COUNT (DISTINCT index_owner || index_name || indexed_cols)
So index_owner is 'USER1' in one case, and 'USER2' in the other; right?
A string that starts with 'USER1' will be distinct from a string that starts with 'USER2', no matter what the rest of the string contains. Maybe you don't want to compare the owners, or maybe you meant to use some other column (such as table_name) instead of index_owner).
I hope this answers your question.
If not, post a little sample data (CREATE TABLE, CREATE INDEX and CONNECT statements), and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
How to transfer number to Excel column letter
I want to write a table into Excel file with fomula "=AVERAGE(G18:G64)", how to transfer table column nunber into excel column letter?
for example, from table column 7, how to know 7 means G in excel?
thanks!Please use report generation toolkit.
Here is the snippet from RGT. -
How to transfer computer name to another person
I want to transfer this IMAC G5 Isight power pc to my son how do I change this computers name to his?
What I've done in the past is to create a new admin account with the new person's name and, after making sure nothing he needs is left in the old admin acct, either delete the old or strip it down to the point where the space it requires is trivial.
If you don't mind reloading a lot of stuff, the more onerous method--if you still have the original Leopard disk--is to wipe the drive and install OSX like it's the firt time. A lot of work compared to the first option. -
How to get item names as column headings???
Hi,
I've given all the items in my complex folder nice user-friendly names, which can be seen in Desktop and Plus, but when I pull them into a worksheet the column headings revert to the underlying column name. Also, in Plus the list of selected items shows this underlying column name while the list of items in the folder shows the user-friendly names! This is really confusing for users.
Is there a way to get Disco to use the item names? Or do I have to go back to the underlying tables and views and recreate them with my user-friendly names?
ThanksIn Administrator when I look at the item properties, it shows my user-friendly item Name as the item Heading as well, but when I go into Desktop and pull the items into a worksheet, the worksheet column headings SOMETIMES default to the item Identifiers (or the underlying table/view column name in the item Formula), NOT the item Headings.
Here's an example - I have 3 numerical items:
1. Name and Heading are both "IP EL Spells", Identifier is "MONTHLY_ACT_EL", Formula is ""V pbc running totals 0406".Monthly act el"
2. Name and Heading are both "IP EL Spells YTD", Identifier is "RUNNING_ACT_EL", Formula is ""V pbc running totals 0406".Running act el
3. Name and Heading are both "IP EL Spells Prev YTD", Identifier is "PREV_ACT_EL", Formula is ""V pbc running totals 0406".Prev act el"
When I pull these into a crosstab in Desktop to sum them, the column headers are:
1. IP EL Spells SUM
2. Running act el SUM 1
3. Prev Act El SUM
The first heading is correct, the second seems to be based on the Formula or Identifier but I don't know where the "1" comes from or why "act el" are in lower case, and the third also seems to be based on the Formula or Identifier, but in mixed case.
I'm baffled! -
How to transfer domain name to Adobe Catalyst
I currently have a website/domain name and email address through Clikpic. I have now changed directions and designed my own website with muse. How do I go about transferring everything to Adobe.
Hi,
http://forums.adobe.com/docs/DOC-1741 -
How to transfer data from CHAR column to DATE column?
I have a column with varchar2 data type contains data with format: dd/mm/yyyy hh24:mm:ss for example 24/11/2013 8:15:22
I want to execute an update statement to put this data also in a date column how?
Note: I'm using Oracle DB 10gBillyVerreynne wrote:
The question you need to ask is why a date value is in a string data type?
And the only (IMO) valid reason for that is when the presentation layer reads the value from a user's input as a string. But even in that case, the client/presentation layer should convert it to a date when binding the value, as date type, to the bind variable of the SQL (or PL/SQL) code executed.
Dates as strings should only exist in the presentation layer.
Well, given the OP's question/problem, it sounds like they may be in the process of trying to correct that bad design.
On the other hand, they could simply be applying a band-aid and thereby be actually compounding the problem.
It would be nice to get a clarification on this point from the OP. -
How to transfer data within blob column to server
Hi,
I have the following requirement where i have a table which has a blob column that holds the files that are attached to a page using front end. I need to fetch these files and import them to server. How do i go about in achieving this?
Any in\puts would be of great help.
Thanks In Advance.876841 wrote:
Hi,
I have the following requirement where i have a table which has a blob column that holds the files that are attached to a page using front end. I need to fetch these files and import them to server. How do i go about in achieving this?
Any in\puts would be of great help.Well, if the blob data is stored in columns on the database then it already resides on the server. If you need to save that data as files on the server then it's just a case of writing out the data to a file in the appropriate directory location.
Example code... (untested)...
As sys user:
CREATE OR REPLACE DIRECTORY MY_FILES AS 'c:\myfiles';
GRANT READ,WRITE ON DIRECTORY MY_FILES TO myuser;As myuser:
DECLARE
-- Data Variables
v_blob BLOB;
v_data_length NUMBER;
-- Loop Control Variables
v_offset NUMBER := 1;
v_chunk CONSTANT NUMBER := 32767; -- maximum chunk size
-- UTL_FILE variables
fh UTL_FILE.file_type;
BEGIN
v_blob := ... populate the blob variable here
v_data_length := DBMS_LOB.getlength (v_blob);
-- Open the file
fh := UTL_FILE.fopen ('MY_FILES', 'myfile.dat', 'wb', v_chunk);
LOOP
-- Exit when our file offset is bigger than our file
EXIT WHEN v_offset > v_data_length;
-- Write the output chunk by chunk
UTL_FILE.put_raw (fh, DBMS_LOB.SUBSTR (v_blob, v_chunk, v_offset), TRUE);
-- Increment the offset by the amount written
v_offset := v_offset + v_chunk;
END LOOP;
-- Close the file
UTL_FILE.fclose (fh);
END; -
Stuck - load the Excel file dynamically with different columns and worksheet names
I have a situation where I want to load the Excel file dynamically, and the excel file have different columns or even worksheet name. Any idea how I could
approach this? I believe there's no way to modify the meta data (specifically the mapping) in the data flow.Hi Chimumu,
The SSIS stock adapters don't supporting dynamic column mapping, to achieve your goal, you need to use Script Task/Component to read the Excel sheet name and the columns in the worksheet, and then map to the output columns of the script component. You can
also refer to the following blogs:
http://micktechblog.blogspot.com/2011/06/ssis-excel-import-with-unknown-number.html
http://wikiprogrammer.wordpress.com/2011/04/08/dynamic-column-mapping-in-ssis-part-1/
Regards,
Mike Yin
TechNet Community Support -
How to know columns and table name whose column size are modified
Hi guys
I want to know which all columns in the tables are modify
i.e. list of columns and table name whose column size are modified
Step1 :
CREATE TABLE employees
( employee_number number(5) ,
employee_name varchar2(50) ,
department_id number(10)
CREATE TABLE Supplier
( Supplier_number number(5) ,
Supplier_name varchar2(50) ,
CREATE TABLE customers
( customer_id number(10) not null,
customer_name varchar2(50),
address varchar2(50),
city varchar2(50),
state varchar2(25),
zip_code varchar2(10),
Step2 :
Alter table employees
MODIFY employee_number number(10)
ALTER TABLE supplier
MODIFY supplier_name varchar2(100)
step3
query to dispaly
columnname table name
employee_number employees
supplier_name supplier
How to know columns and table name whose column size are modified
could you please provide query
Thanks in Advance09:35:50 SQL> desc dba_objects
Name Null? Type
OWNER VARCHAR2(30)
OBJECT_NAME VARCHAR2(128)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID NUMBER
DATA_OBJECT_ID NUMBER
OBJECT_TYPE VARCHAR2(19)
CREATED DATE
LAST_DDL_TIME DATE
TIMESTAMP VARCHAR2(19)
STATUS VARCHAR2(7)
TEMPORARY VARCHAR2(1)
GENERATED VARCHAR2(1)
SECONDARY VARCHAR2(1)
NAMESPACE NUMBER
EDITION_NAME VARCHAR2(30)LAST_DDL_TIME can be utilized -
How to Select data using same column name from 3 remote database
Hi,
Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
Ex.
SELECT *
a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
FROM
*((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
*(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
WHERE b.dept = 'finance'
AND a.position = 'admin'
AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
GROUP BY a.name, b.status ;
NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
Thanks in advnce. :)
Edited by: user12994685 on Jan 4, 2011 9:42 PMuser12994685 wrote:
Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
Each object must be uniquely identified. So you cannot do this:
select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
SQL> select * from (dual, dual) d;
select * from (dual, dual) d
ERROR at line 1:
ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
SQL> select * from (select * from dual d1, dual d2) d;
select * from (select * from dual d1, dual d2) d
ERROR at line 1:
ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
DUM DUM
X X
SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution. -
Smartforms - how to change name of column in main
Hi all,
I have four columns in a main of a smartform:
Concept Period Tax Base Tax ammount
I would like to change places of the coulmn names Concept and Period so that the columns are placed in this order:
Period Concept Tax Base Tax ammount
I have changed the place for the content of the columns, but don't know how to swap the names of the columns. Where are the names of the columns defined?
How can I change the places of these two columns (column titles) in main?
Thanks in advance!
BR,
ArminHi..
usualy Column headers will b in header part of the table...
please check the header part
Maybe you are looking for
-
2 different countries in same grping 99
HI Frnds, Im now Working on implemention Project For Ghana. in SAP this comes under other Countries. Our existing implementation has already considered other countries (99) group. so now can be possible to have both the abv into 99 or else how to ma
-
How can I send a complete calendar file to another Mac user? So far only individual photos are sent.
-
How long is the shuffle warranty?
I don't know if mine has ever worked properly, always have that little orange light flashing but have been able to update etc, up till now. Now my imac doesn't recognize it anymore so I can't update. Bought it April 2005. Too late?
-
Can't recognize VB object with UFT 11.50
Hi, I´m trying to automate some proceses in an VB aplication, but I am not able to recognize the objects in UFT 11.50. Recording the process, the lines recorded are the following: VbWindow("appStdZap").VbWindow("docStdInputList_2").ActiveX("RBTree C
-
For almost a year now, I've had audio play through SPDIF to a 5.1 surround receiver. Both surround and stereo worked like a charm through 1 cable. I haven't bothered watching a movie on this system in nearly 2 months, but when I tried to today, I n