Ask Your Question
1

How to hide a spreadsheet

asked 2017-02-28 23:07:23 +0100

Fede gravatar image

updated 2017-12-10 17:05:08 +0100

erAck gravatar image

Hello!

Sorry, but it is possible hide a spreadsheet with starbasic in calc?

Thank You

Good Life

Fede

LO: 5.2 SO: 10

edit retag flag offensive close merge delete

Comments

1

Hi

You would have a response corresponding to your need if you specify them: do you want to hide a spreadsheet when it is opened, or hide an already opened spreadsheet? Do you want to hide the spreadsheet or one of its sheets?

Regards

pierre-yves samyn gravatar imagepierre-yves samyn ( 2017-03-01 08:09:44 +0100 )edit

Sorry, It was not clear; I would like to hide one or more sheets

Thank you, Pierre

Fede gravatar imageFede ( 2017-03-01 08:24:32 +0100 )edit

AFAIK, 'spreadsheet' is the whole file, while 'sheet' is a tab, or officially known as sheet, in the file. That's the distinction. Hiding the file in true sense is impossible without changing the name and file extension, and if someone wants to find a spreadsheet he can use systems like the magic detection on NIX through file. Hiding a sheet in the file is another story to which you got an answer, but I'm pretty sure it can be found out even without seeing the code used to hide it.

rautamiekka gravatar imagerautamiekka ( 2017-03-01 16:18:09 +0100 )edit

Hi @rautamiekka

This is not to hide the document in the file system. It is possible and common to open a spreadsheet (or other document) hidden by macro. See API

Regards

pierre-yves samyn gravatar imagepierre-yves samyn ( 2017-03-01 16:40:58 +0100 )edit

@pierre-yves samyn: Yeah I figured he'd mean that, and I said he got the answer for it.

rautamiekka gravatar imagerautamiekka ( 2017-03-01 17:37:35 +0100 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2017-03-01 08:40:18 +0100

pierre-yves samyn gravatar image

updated 2017-03-01 08:41:36 +0100

You can do:

oSheet = thiscomponent.sheets.getByName("Sheet1")
oSheet.IsVisible = false

Regards

PS: MRI use is a good advice :)

edit flag offensive delete link more

Comments

OK thank you :)

Fede gravatar imageFede ( 2017-03-01 16:04:00 +0100 )edit
0

answered 2017-03-01 00:36:17 +0100

karolus gravatar image

Yes, it is possible!

Install MRI and start with programming by yourself, not only with copy and paste from others.

edit flag offensive delete link more

Comments

Ok thank you :)

Fede gravatar imageFede ( 2017-03-01 16:04:09 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-02-28 23:07:23 +0100

Seen: 73 times

Last updated: Mar 01 '17