Excel with column and row controls?

gaurab

New Member
Hello guys,

Can we export a table of DB to Excel with column and row controls , what i mean is , to generate xls document from a table in DB , such that some of its columns ( not all ) will be protected and user can not modify the data where as some of the columns will be available for end user updation ??? is there any method or command for this...

plz hlp,,,,,,,:confused:

gaurab:(
 

alvin

New Member
Hello guys,

Can we export a table of DB to Excel with column and row controls , what i mean is , to generate xls document from a table in DB , such that some of its columns ( not all ) will be protected and user can not modify the data where as some of the columns will be available for end user updation ??? is there any method or command for this...

plz hlp,,,,,,,:confused:

gaurab:(

You can export db into CSV file, which is easy to modify and import.
But the codepage of these files should be considered, because that the codepage of CSV files will changed after Excel editing.
 

gaurab

New Member
thanks , but even if i export the DB in CSV ( which could be easily done :lol: ) , i need to enforce the securities to some of the columns and some of them should be available to user to be modified :rolleyes:?? is that any way to do it in CSV format ???

gaurab
 

alvin

New Member
thanks , but even if i export the DB in CSV ( which could be easily done :lol: ) , i need to enforce the securities to some of the columns and some of them should be available to user to be modified :rolleyes:?? is that any way to do it in CSV format ???

gaurab

As plain text file, CSV file can not meet these requirements. Could you try to control them manually? Such as only to export those collumns allowed modification?
Or you could search for toolkits for Excel files to Progress in Sourceforge.net.
 

sphipp

Member
Unfortunately, I don;t have my Excel include file to hand and I don't have Progress installed on this PC, so I can't check the syntax, but ...

From an excel macro, you probably want to set the locked attribute of a range or cell, so something like this might work:
h_excel_cell:locked = yes.

Then you need to protect the worksheet:
h_excel:sheets (1):protect

So, you would do something along these lines:
1. Dump the contents into a CSV file.
2. Import the CSV file into Excel.
3. Run through the cells and set :locked = yes or :locked = no, depending on which cells you want to lock (you might be able to skip :locked = yes as Excel seems to lock them automatically)
4. Format the worksheet
5. Protect the entire workbook/worksheet
6. save the workbook

You could skip 1 and 2 by directly creating cells in Excel, but this is a lot slower, especially for large amounts of data.

I hope this helps a little. Sorry I don't have the exact syntax.

Simon
 
Top