Non editable internal reference string for excel file - excel

We have a web application that allows users to generate excel reports.
We would to have a way to set reference value to one of the properties of the excel file so that we can identify if the excel report belonged to our system
Most of the properties like "Title","Subject" etc are editable by a user by right clicking on the excel file > properties > details
Is there a property that is non editable by a user?
Thanks in advance

Is there a property non-editable by a user?
No.
But concerning "identify if the excel report belonged to our system", you may use some tricks. The easiest (for implementation) I can think of are:
Save the file as *.xlsb, insert a module in VBA and write something in the module. Then save the VBA with a password;
Add a very hidden worksheet and write something on it. Or simply rename the very hidden worksheet somehow, which would tell you that this is your worksheet;
Add a specific conditional formatting and do not implement it anywhere. Thus, every worksheet, that contains the conditional format would be yours;

Related

creating dynamic hyperlinks when importing data into excel

I am trying to automate a process where data is queried from the database, downloaded into an excel file and sent to recipients. One of the column in the excel file needs to be a hyperlink. How can i make this happen?
I selected =hyperlink(A,B) into the column but the function appears as text and not as hyperlink.
I tried changing the web options to 'update links on save' but it does not help.
Only when i click in the cell and hit enter does the hyperlink appear. This is not an option
Opening the file and adding a new column to use the hyperlink function is not an option either since the process is being automated.
The tool allows me to export into an xlsx and not a xlsm so i am assuming i cannot use macros to do the job.
I tried researching the answers for similar questions but didnt find any that i could use which will generate a url dynamically without me having to open the file. Any ideas?
I also tried another tool and they were able to send out emails with links. I do not know how they do it internally but i do not see any hyperlink functions when i tab into the hyperlink column.
Cell type should probably be set to "Generic".
You may also need to trigger a "Refresh" after the workbook is filled with all the data. Sometimes I need to that manually - but only once. I have no idea why it happens.

How to create a drop-down list in a excel file with data coming from another Excel file used like database?

I'm using an Excel file like a Database.
I have another Excel file that need to be filled with information coming from the Excel file Database.
Is it possible for the Excel Database file to populate lists into my other excel file ?
Thanks a lot
Under the Developer tab in Excel you can select 'Insert' and then 'Listbox'. Create your list box in excel, then right click the box and press "Format Control". Under the "Control" tab, you can change your Input range which can be used across different worksheets thus creating a list. From there you can assign macros of your choice such as a ListBox_Change macro.
Typically you can make a list box in Excel using Data Validation, but that will only work within the same workbook.

Create dynamic link to embedded documents in Excel WITHOUT VBA

Firstly, I realise this problem could be solved with VBA, but I am looking to keep this workbook macro-free.
What I am trying to do is have several Excel workbooks embedded into my workbook (each embedded workbook is specific to a factory). I want to create a cell that acts as a dynamic hyperlink, which changes depending on which factory is filtered (I don't have any issues creating this dynamic hyperlink myself). The part I don't know how to do, is create a hyperlink that opens a document that is embedded within the workbook. I can make a hyperlink that opens a file saved in a directory, but I need to be able to share this workbook with multiple users, therefore I am embedding the documents.
Hopefully this makes sense - to summarise; I need to create a button/hyperlink that opens an embedded document WITHOUT VBA.
Many thanks
You have an EXCEL function HYPERLINK that receives a string (i.e. URL) as the first parameter. You can of course set BUILD the URL with a formula or a reference to other cell.
For instance, if you set in a cell the value:
=HYPERLINK("http://www.google.com")
and link on it, Google's page will be open on your browser. If you set the link to point to a file (any file) it will open it with the suitable application (e.g. Excel).
Is this what you were looking for?

Is it possible to save table data into another macro?

Does macro programming allow to read data from a table and hardcode it into another macro?
Situation is that I want to read all data from a worksheet with a macro. I then want to save that data without the help of an additional program to another macro so I can delete the table, restart my pc and still be able to retrieve all data from my macro.
You can "create a macro through a macro" (OPs words) through the VBIDE.
To so so, add a reference to Microsoft Visual Basic for Applications Extensibility. You can then write code to read and write to your VBA application. You will also need to set Trust access to the VBA project object model in the trust Center.
That said, there may be better ways to achieve what you want, eg
Hide the sheet using xlSheetVeryHidden so it's only accessable from VBA
Write the data to one or more hidden Names
If you are using .xlsm, these documents can also contain custom XML parts, which you can use to store arbitrary XML data in the documents. MSDN refrence: Custom Xml Part

excel add in to save internal data?

I am new to writing excel add-in (in C#) and trying to figure out the right way to save some internal data structures so I can restore the state the next time file is opened. I can convert data in xml or base64 strings if it makes things easier. I don't want to maintain a separate file and would like to embed this information inside excel worksheet.
Many thanks for your help.
Use a cell in an invisible sheet (you can name it, for example, "internal data sheet") for storing the information. Excel sheets have a Visible property which can be set programmatically to `xlVeryHidden' which means it can only be made visible again by a program. Here you find some more information:
http://support.microsoft.com/kb/142530/en-us

Resources