Microsoft Excel background grid color default reverts

In summary: The risk of damage is high. If you mess up manually, you might ruin a spreadsheet. If you automate the process you could ruin all of them.
  • #1
member 428835
Basically, microsoft excel always has white background cells, and I'd like it to be a different color. Here's what I've tried: I configured the below registry value in my Windows 11 user profile to change the default window color from 255 255 255 (i.e. white) to 192 192 192 (i.e. a not so bright on the eyes grey). Excel is much easier on the eyes with this setting (unless a white fill cell shade has been applied). However, after a while, if I close Excel, and re-open Excel, or if my computer sleeps, the colors revert to white despite the number in the registry still reading 192 192 192.

Windows Registry Editor Version 5.00

; reg query "HKEY_CURRENT_USER\Control Panel\Colors" /v Window
; reg add "HKEY_CURRENT_USER\Control Panel\Colors" /v Window /t REG_SZ /d "192 192 192" /f

[HKEY_CURRENT_USER\Control Panel\Colors]
"Window"="192 192 192"

Do you know how to fix this? Seems pointless to have a setting that changes the window colors only to revert/override by another setting.
 
Computer science news on Phys.org
  • #2
I got this by turning on the High Contrast Windows Setting.

1671749541291.png
 
  • #3
anorlunda said:
I got this by turning on the High Contrast Windows Setting.

View attachment 319233
I'm wondering if there's a way without high contrast, and just leaving it in dark mode
 
  • #4
Select the whole worksheet. (Click in the top left corner. Right click, go to the Background tab and select the color you want,

How did I find it? Entered "excel set background color" into Google. Sixty-two million hits.
 
  • #5
Vanadium 50 said:
Select the whole worksheet. (Click in the top left corner. Right click, go to the Background tab and select the color you want,

How did I find it? Entered "excel set background color" into Google. Sixty-two million hits.
Okay, there’s some sarcasm there for sure. Yes I saw those solutions but they’re dead wrong. They only change CURRENT files, but I have tons that are given to me, past, etc. What I’ve shown above fixes this issue until the computer restarts, or sleeps. A myriad of users face the same issue (recently in 2022) yet no fix has been made. I write here to ask if anyone knows the root of the cause.
 
  • #6
They only change CURRENT files, but I have tons that are given to me, past, etc
Much work, but have you tried re-saving those old spreadsheets after changing their background color?

There is another possibility for batch changes. XLSX files are Zipped XML files. You could unzip a file, read the XML text files to find and change the background color, then zip them all together again. Of course someone may have already written a program for this.

Two programs I've found useful for before/after registry compares are:
InCtrl5
REGSHOT

You run one of the above for a "Before" registry capture
Do the install or run whatever program you are investigating
Run the capture program again and it reports all (or a specified subset) of the registry changes

There is also a program called REGMON that monitors registry accesses and reports them in real time. It was found on one of the Microsoft websites but I haven't looked lately.

All three are very old programs and may be hard to find... Ahh, some time spent Googling was succesful!

InCtrl5 can be found at: (about middle of the page, under Install Tracer)
https://www.hiren.info/downloads/freeware-tools/page/8

The REGSHOT website no longer exists, but the program seems to be available at: https://sourceforge.net/projects/regshot/

Hope it helps,
Tom
 
Last edited:
  • #7
joshmccraney said:
They only change CURRENT files, but I have tons that are given to me, past, etc
Well, you might have said that at the beginning rather than getting grumpy about the imperfect mental telepathy of the readers here. For someone who demands a lot of help from PF, your sure don't make it easy. And easy is respectful.

Excel stores cell attributes like color, fonts, etc. with the worksheet. I hope this is obvious - if it didn't, how would it remember them, especially across computers? So if you want to change the file contents, you need to open the file and change its contents. Again, I hope this is obvious.

By far, the easiest solution is to follow Google's advice, and when you open a file to work on it, make the half-dozen clicks to change the color and save it. When you next open it, it will have the new colors.

It is possible to automate the process with a combination of the Automate Tab and Scripts. I strongly recommend against this.,
  • If it takes a few seconds to change the color, and an hour to write and debug the script, breakeven is at about a thousand files. Very, very few people have a thousand spreadsheets they are actively using.
  • The risk of damage is high. If you mess up manually, you might ruin a spreadsheet. If you automate the process you could ruin all of them.
  • When your code has changed the file and opened it, you must, must, must open it and make sure it wasn't broken. That removed any time savings.
Mucking with the registry is almost never the right answer, and it is never the right first step. That would be like wanting to kearb to juggle and starting with chainsaws rather than bean bags. In the case at hand, the absolute best you can hope for is a change of cell background colors that have never been set. That is not what you say you wanted.
 
  • Like
Likes berkeman
  • #8
Tom.G said:
XLSX files are Zipped XML files.
I would also not recommend this either. Every argument for not doing this as a batch program inside Excel goes double for doing it outside of Excel. WEill it work? Sure. But I still would not do it this way.
 
  • #9
Demands a lot? You use the word loosely. How you expect people to reply to sarcasm? The 62 million hits comment was superfluous and kinda rude. Not sure if that's how you meant it but it came off demeaning. If you follow my posts here (your response implies you do), you know I research before posting. The approach you suggest is manual, so when I generate dozens of .csv files a day I'd prefer not having to manually change the background (notepad++ works here, but plotting in there is tough). I did the approach you suggested first, but it gets tedious real quick. The registry approach does work, but fails upon reset. It's odd because the numbers themselves in the registry detailing the color do not change, so something is overriding the registry. Sounds like there's no good solution, or if so no one seems to be aware of it (both on PF and many other sites I've seen). High contrast might be the only approahc... Tom, I'd look into those but this is a work machine, and I can't really install third party apps. Thanks for the suggestion. Appreciate everyone's feedback.
 
  • #10
joshmccraney said:
so when I generate dozens of .csv files a day I'd prefer not having to manually change the background
I haven't read your thread, but instead of creating these with File, New, can you instead use File, Open, Save-As? That way you could have one starter file that has the properties you want, and it gets re-used each time you want to create a new file.
 
  • Like
Likes gmax137
  • #11
joshmccraney said:
when I generate dozens of .csv files a day
And another requirement slowly leaks out.

You haven't said if you want to keep these in CSV format or you want to save them as XLSX. If the former, there is no concept of "cell", much less "cell color". It won't be saved with the file no matter what you do.

But honestly, if five clicks is too much work, I doubt any recipe for doing this will be satisfactory. (And put another way, you have already spent more time trying to find the better solution than weeks and weeks of five clicks.

berkeman said:
creating these with File, New, can you instead use File, Open, Save
Well, one can bring it in via Data/Get Data. But that opens a dialog box that will be more than five clicks. Plus whatever it takes to change the format.
joshmccraney said:
something is overriding the registry
Nothing "overrides" the registry. The registry doesn't do anything. It
is just a database. An easily corruptable database with no guarantee that any given change will do what you want. It's almost never what you want.
"
 

FAQ: Microsoft Excel background grid color default reverts

1. Why does the background grid color in Microsoft Excel keep reverting to the default?

There could be several reasons for this. One possibility is that the file you are working on has been saved in a format that does not support custom grid colors. Another reason could be that your Excel settings have been reset or changed, causing the grid color to revert to its default setting.

2. How can I change the default background grid color in Microsoft Excel?

To change the default background grid color, go to the "File" tab and click on "Options." In the "Advanced" tab, scroll down to the "Display options for this worksheet" section and select the desired color under "Gridline color." Click "OK" to save your changes.

3. Can I set a different default grid color for each Excel workbook?

Yes, you can. To set a different default grid color for each workbook, open the workbook and go to the "Page Layout" tab. Click on "Colors" and select the desired grid color. This will only change the grid color for the current workbook.

4. How can I make the changed grid color to apply to all my Excel documents?

To apply a custom grid color to all your Excel documents, you can create a template with the desired grid color and use it as a default template for all new workbooks. You can also save your current workbook as a template and use it for future documents.

5. Is there a way to disable the background grid in Microsoft Excel?

Yes, you can disable the background grid in Excel by going to the "View" tab and unchecking the "Gridlines" option. This will remove the gridlines from the current worksheet. Keep in mind that this will only hide the gridlines for the current worksheet and will need to be repeated for each new worksheet.

Similar threads

Replies
1
Views
2K
Replies
1
Views
9K
Back
Top