Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm creating an application which loads data from an excel sheet used by various clients.
All of the columns are predefined with field labels, except the 7th column (column G), which I would like the user to be able to label themselves, and have this pull into QV dynamically.
So for example, in the script it would beL
LOAD
Age,
Gender,
Location,
Column G as Whatever the user named it,
FROM....
And in the application, the field could be used as 'Column G', until it gets renamed by the script.
I hope all this makes sense - is it possible?
Check the attached
////Test1
//
//Headers:
//LOAD *
//Where RecNo() = 4;
//LOAD @1 as Header
//FROM
//[266730.xlsx]
//(ooxml, no labels, table is Sheet1, filters(
//Transpose()
//));
//
//Table:
//LOAD *
//FROM
//[266730.xlsx]
//(ooxml, embedded labels, table is Sheet1);
//Test2
Headers:
LOAD *
Where RecNo() = 4;
LOAD @1 as Header
FROM
[266730.xlsx]
(ooxml, no labels, table is Sheet2, filters(
Transpose()
));
Table:
LOAD *
FROM
[266730.xlsx]
(ooxml, embedded labels, table is Sheet2);
Reload the two codes one at a time and see how the front end chart's dimension changes based on the field being loaded
Where will the user give it a name? You will have to explain the setting a little more here
Sorry - the heat is making me slow
So the user will complete the spreadsheet and will label the column and choose what values are given.
So for example, the might choose to name Column G as 'Hair colour' and give values of 'red, black, brown, blonde' etc
In my application, I would then want any place where I have used Column G, to become 'Hair colour'
Hi
You can use LOAD * FROM ...
And all the columns will be loaded whatever the name
But how would I use the field within the application?
For example, if I wanted to create a chart with Column G as the dimension...
Why don't you just load with * so that the field names that your user have used are the ones that get picked in your app
But how would I use the field within the application?
For example, if I wanted to create a chart with Column G as the dimension..
You can load the names of the columns in another table
If you load the same excel sheet without labels, the names of the columns will be at the first row. Later you must to store the value of the first value of the fourth column in a variable.
This must to work.
Check the attached
////Test1
//
//Headers:
//LOAD *
//Where RecNo() = 4;
//LOAD @1 as Header
//FROM
//[266730.xlsx]
//(ooxml, no labels, table is Sheet1, filters(
//Transpose()
//));
//
//Table:
//LOAD *
//FROM
//[266730.xlsx]
//(ooxml, embedded labels, table is Sheet1);
//Test2
Headers:
LOAD *
Where RecNo() = 4;
LOAD @1 as Header
FROM
[266730.xlsx]
(ooxml, no labels, table is Sheet2, filters(
Transpose()
));
Table:
LOAD *
FROM
[266730.xlsx]
(ooxml, embedded labels, table is Sheet2);
Reload the two codes one at a time and see how the front end chart's dimension changes based on the field being loaded
You are a genius!
Thank you so, so much!!
I really wasn't sure it could be done