Forum Discussion
ctcarraway
Mar 18, 2021Copper Contributor
Extending Grid Lines
I have entered headings along the top of the Excel worksheet. I would like the grid lines to print across and down the entire sheet, but it is only printing around my headings. Basically, I'm creating a chart where someone can fill in info under each heading, but I need grid lines to keep it neat.
Windows 10
Thank you - Cindy
1 Reply
Sort By
- sushanta_sahaCopper ContributorWhy Connect-SPOService it is not in Mac?
- iCer19Copper ContributorThanks for your time in looking at this. I was hoping I'd made a silly error which was obvious from the details I'd given.
I had printed the values being passed to the function (before and after), and they appeared correct.
RE the error, I was struggling to pull the full error back from the function, with my limited PS experience.
As it turns out, it all works fine from another machine. I've been chasing my tail over something that I can only assume is a local PS issue.
thanks again.- LainRobertsonSilver Contributor
No problem.
If you get curious and want to surface the underlying error without having to change your existing code, include a "throw" statement in your "catch {}" block, like this:
try { # Normal stuff ... # ... such as calling your cutsom function, etc. } catch { # Do whatever you need here before calling the throw statement to bubble the caught exception up one more level. # .. do stuff ... # .. do even more stuff ... # Finished doing stuff ... throw; # This re-throws the exception that caused us to get in here in the first place, so you can see the precise exception details such as line numbers, etc. }
Cheers,
Lain
- iCer19Copper ContributorCheers,
Yeah, I'm using throw. (But not with a semicolon)
problem I found is that my ISE and VCS are crashing when it bombs out. but even before it crashes, I don't get the error detail, only what I'm capturing as the -errorvariable.
- mathetesSilver Contributor
Under the File menu, down toward the bottom, you'll see "Page Setup"
Select Page Setup and then click on "Sheet"
Then, down on the left, check the "Gridlines" box under Print Options
But if all you're doing is creating a paper form for others to fill in data, you might have better control over the layout and look by using the Table option in Microsoft word. Just make sure the gridlines are visible, as they are by default.