Hyperlink within a OpenOffice calc using c# - c#

I've made a spreadsheet in openoffice using c# with several different sheets. On sheet 1 is a list of all the names of the rest of the sheet. how is it possible to set up a hyperlink from each of these cells to there corresponding sheet.
I have looked through the internet but i have struggled to find any helpful information. Can anybody point me in the right direction on how to program this?

I'm not sure if i understand you right, but this may be helpful, put it in your cell:
=HYPERLINK("MyTableName.C3")
This (should) jump to cell C3 in table MyTableName.
To just jump to a table use
=HYPERLINK("#MyTableName")
I cannot try it because i don't use OpenOffice
Source: http://www.ooowiki.de/HyperLink

Related

How to put value into span cell using aspose.cell?

I am using Aspose. Cell for .net to write some data into Excel. I have a quick question:
what are the best practices to get and write a value into the below cell?
this kind of cell may be across multiple columns/rows, does it belong to Rang or a special cell?
thanks
If it is merged cell, then you should use Cell object (you may use its PutValue method to insert data). Please note, in MS Excel sheet, when you merge a range of cells, the merged cell’s name will be top left cell,
so it will be accessed by that name. For example, when you merge "B1:F3" cells, it will become one big cell (B1). Now you got to access and insert data into B1 cell if you want to insert some data into that merged area range.
PS. I am working as Support developer/ Evangelist at Aspose.

How to make Excel sheet readonly using asp.net?

My Task is to generate excel sheet as read only(i e., columns data should not be editable) using asp.net?
I am getting data from the database,then am generating the excel sheet for that data but it is editable.I want to make my excel sheet as non editable.
How should I do?
Anybody can please help me?
I have written code like this..
Thanks in Advance....
Try to look this topic - first and second. Second one offers a solution even for cells.

How to Insert Values in Specific Excel Cells From DataGridView

Can you please help me to figure out how I can insert DataGridView values into a pre defined excel template (Into Specific Cells)?
I have a DataGridView on my windows Form which is getting the values from user input. Now I would like to enable users to export the DataGridView values into an excel file (A File like attached excel file).
As far as I know I have to create the headers and add them to the code programmatically but for the DataGridView part, honestly I have no idea how I can do that?
As you can see the Form (Box) is starting from B2 to K2 and end from B21 to K21 Now my question is how i can start importing values from B4 - k4 and so on?
Is there any way I can format the style of the cell (like Background color or font style and size) from C#? I mean generating a form like what is looking in attached Excel programmatically.
Thanks for your time in advance
Not sure if this is what you're looking for but ff you are using Office Interop, you can insert a 2-dimensional array into a range in Excel.
The following snippet might not be correct (no VS nearby and I haven't used excel automation for a long time) but you'll get the picture.
Excel.Range oRange = oSheet.Range("B2",Missing.Value);
oRange.Resize(myArray.GetLength(0),myArray.GetLength(1));
oRange.Value = myArray;

Excel: Ctrl + DownArrow action

Anybody please tell me which action program does when I click CTRL+↓ hotkey?
I know that program navigates down to the next non-empty cell. But when I create Excel document from Excel.Interop the CTRL+ ↓ doesn't work like it have to. It navigates to the last cell in the column...
Any help is greatly appreciated.
UPDATE: I'm sorry for being not so clear. I don't care about CTRL+↓ behaviour actually. I'm concerning about what causes data acting like one big cell?
Jeffrey,
Not sure what you mean by, "acting like one big cell". If you want to get the entire used area of a sheet, used the property UsedRange on the Worksheet object. It will return a two-dimensional array of the used range for that Worksheet. I've used it when a Worksheet contained all the data in a table. Much easier than iterating the Worksheet.
Cheers!

Excel Doc after c# modifications: Ctrl + DownArrow is not working properly

guys!
After I create Excel document in my c# application the Ctrl+DownArrow combination doesn't work properly.
It goes to the last row in the current column. So looks like it means all sheet as one data region WITHOUT empty cells.
so I guess empty cells in my excel sheet aren't empty for Excel.
How to figure it out?
Thank you,
Try creating a macro of what you want to happen. Then look at the macro code which is based off of interops calls. See if it sheds a light on your issue and how to resolve.
Just filter out the "Blanks" Ctrl+Down Arrow and all the blank cells would be selected, now press delete (From key board).
DONE. Now you can jump between entries with Ctrl+Down Arrow.

Categories