Microsoft Office and OS X

Well, the solution was to do this in Office 2016, which has a native, built-in connector for SQL Server. So now this working, but it took some effort:
  1. I was unable to Refresh All on a Pivot Table/SQL Query that was created in Win/Excel, even if I manually created another connection to the same database and table with the same user credentials.
  2. I was able to connect to the database and find the appropriate table, but there's no column browser, so I couldn't select my columns by pointing and clicking. I had to manually type out the SQL query. At least I remembered how to do that:
    Excel2016SQLQuery.png
  3. Once I created a new Pivot Table from the SQL Query on the Mac side, and saved it, I was then able to open it in Win/Excel and Refresh All over there.

So it's working, but it was a pain in the ass to get there.
I've been using this for the past few years, and it works, but Excel asking for permission every time is a pain in the ass. This is an internal spreadsheet that never leaves the building, talking to a SQL Server instance that is not accessible from outside one particular subnet on our internal network.

Apparently there is no Trust Center in Excel/Office on macOS. Is there any workaround to allow Data: Refresh All to execute without any additional clicks?
 
Hmmm. Here's a frustrating bug that's common to Mac Office 2021 and Win Office 2019/2021 (and probably earlier):

I have screen captures from an ancient HP 3585A Spectrum Analyzer, captured as HP-GL (.plt) files via the KE5FX GPIB Toolkit, and then converted from PLT to PostScript format using HP-GL Viewer and then further converted to PDF via macOS Preview (an older version, since macOS 13 doesn't open .ps anymore), which rendered them sideways:

1691702281129.png,

so I rotated them in Preview, and finally inserted them into a Microsoft Word document.

When viewed in Word, the plots have the correct orientation:

1691701178785.png

but when converted to PDF via Save As: PDF (Best for electronic distribution) in Word, the plots get turned sideways, and curiously, rotate 180º from their original orientation (e.g. when converted from HP-GL):

1691701423745.png

I get the same result from all 3 versions of Office that I have access to (links at the top of the post).

I can work around this error by using Save As: PDF (Best for printing) on either platform, or, in Mac Office, by Print: Save as PDF, but then I don't get any of the hyperlinks that I've laboriously inserted into my document.

Does anyone know why this happens?
 
Anyone know how to get Word on MacOS to have a consistently true black background?

Obviously there's dark mode, but dark mode is more often than not a kind of bizarre gray color. It's sometimes possible to get the background of the page itself to be true black, but the bizarre gray color tends to persist:

Microsoft_Word_MacOS_Lacks_True_Black.png


I have no idea why Microsoft doesn't make it easier to get true blacks, but they don't, and it's incredibly annoying.
 

jeanlain

Ars Tribunus Angusticlavius
6,770
Anyone know how to get Word on MacOS to have a consistently true black background?

Obviously there's dark mode, but dark mode is more often than not a kind of bizarre gray color. It's sometimes possible to get the background of the page itself to be true black, but the bizarre gray color tends to persist:

View attachment 61691


I have no idea why Microsoft doesn't make it easier to get true blacks, but they don't, and it's incredibly annoying.
Most system colors don't become black in dark mode. I don't find that word behaves differently from other apps.
 
  • Like
Reactions: Hexadecimus

Scandinavian Film

Ars Scholae Palatinae
1,285
Subscriptor++
Anyone know how to get Word on MacOS to have a consistently true black background?

Obviously there's dark mode, but dark mode is more often than not a kind of bizarre gray color. It's sometimes possible to get the background of the page itself to be true black, but the bizarre gray color tends to persist:

View attachment 61691


I have no idea why Microsoft doesn't make it easier to get true blacks, but they don't, and it's incredibly annoying.
It may not be a perfect solution for you, since it forces the ribbon to auto-hide, but Focus mode lets you change the background color:

View->Focus, then View->Background->Black:

1692893887766.png
 
  • Like
Reactions: Jeff3F

Hap

Ars Legatus Legionis
10,565
Subscriptor++
Hey, I spent a long time calibrating the white point of this monitor — I want to see as much of it as humanly possible!
I don't understand how you stand the glare. Everything on my screen is dark, but then html emails come in with a glaring white back ground I have to delete them immediately or minimize mail as it feels like the sun on my face. Exaggeration I know, but it really does bother me.
 

autostop

Ars Scholae Palatinae
851
I don't understand how you stand the glare. Everything on my screen is dark, but then html emails come in with a glaring white back ground I have to delete them immediately or minimize mail as it feels like the sun on my face. Exaggeration I know, but it really does bother me.
Is your monitor set to 100% brightness?

20 years ago, a high-end LCD monitor ran at 200 nits. We thought that was fine back then. A regular monitor today peaks at around 2x that; a Macbook is 2.5x that; an Apple Studio Display is 3x that. 500-600 nits aimed at your face.

The peak brightness of these modern displays is meant to allow you to compensate for unusually bright environments, like sunny floor-to-ceiling windows or a photo studio. If you're in a regular office, then setting it to "fight back against the sun" levels is absolutely going to cause your pupils to contract. Don't do that. A monitor should be just slightly above the average ambient light levels of the room it's in. For most modern displays, that's probably well below the max. In a darker space, like a basement, it maybe just above minimum.
 
It may not be a perfect solution for you, since it forces the ribbon to auto-hide, but Focus mode lets you change the background color:

View->Focus, then View->Background->Black:

Thank you for this! It's definitely better than nothing, although I still don't understand why Microsoft doesn't make this an easily solvable problem in the OLED era.
 

Honeybog

Ars Scholae Palatinae
2,075
I'm not sure if it's related to a recent update, but when revising a shared document that I did not create, my name (on the changes or comments) becomes "author" each time the doc autosaves.
Pretty annoying.

EDIT: nevermind, that was a protection setting.

Ironically, when I had a job that required removing metadata from documents, I considered this a killer feature. As far as I know, Office on Windows forces you to go through Inspect Document every time to remove authors. One of those rare cases where MS actually gave OSX a better feature.
 
What determines whether Excel automatically converts pasted text into columns or not?

I have this fancy Excel sheet that charts my bee hive's daily weight gain:

1715903558796.png

I have a Raspberry Pi connected to 4 stamps.com postal scales, logging the weight every 10 minutes to a text file. Until I can figure out how to automagically push data up to a Google sheet and produce this same chart, I'm stuck opening that text file every few days and copy/pasting new data into Excel.

Sometimes I paste new data, and Excel helpfully figures out that it can be parsed into 8 or 12 columns by dash or space character.

Sometimes it doesn't, and I have to do Data: Text to Columns manually.

What I can't figure out it why it behaves differently. I can't correlate the behavior with whether the workbook has recently had data pasted into it, or whether other workbooks are open, or whether I copy the trailing carriage return, or whether I've saved since the last paste, or, ?????

It just seems to be random.
 

gabemaroz

Ars Scholae Palatinae
1,287
Is it possible to change the way the txt file is written on the Pi? Using a more widely used delimiter like a tab or a comma instead of a space between the values might help. Also you have some dashes in the data file which can also be used as a delimiter. I can't speak to how Excel is 'making decisions' here, but if you unify around a single delimiter it will most likely clear up the issue.

As far as pushing the value to a Google Sheet. It's kind of off topic here. You can direct message me and I'd be happy to work through it with you. I've got a lot of experience with Apps Script, mostly for hobbyist type stuff. Or start a different thread since it's not really Office pertinent.

Edit: I'm 99% sure just throwing "How I can get my Raspberry Pi to write information to a Google Sheet" into ChatGPT will get you almost all the way there.
 
Last edited:
Also, I'm trying to step through the timeline in Excel to make an animation. This code works fine in Excel/Win to produce 1.png, 2.png, 3.png, etc., for further processing in ffmpeg, but it fails on my Mac with:

1715995570365.png

Code:
Sub MakeChartLoop()
Dim NumLoops As Integer
NumLoops = 100
Sheets("Weight").Range("RowsToPlot").Value = 1000
Dim ThisLoop As Integer
For ThisLoop = 1 To NumLoops
    Sheets("Weight").Range("RowsToPlot").Value = Sheets("Weight").Range("RowsToPlot").Value + 10
    Call exportChart(ThisLoop)
Next ThisLoop
End Sub

Sub exportChart(Index As Integer)
'Dim IndexString As String
Dim endFileName As String
Dim theChart As ChartObject

Set theChart = Sheets("Weight").ChartObjects("WeightLogChart")
'Set IndexString = Index.ToString

'build file path and name
'make sure to concatenate the backslash or you will land in the
'parent folder with the target folder in the filename

endFileName = ThisWorkbook.Path & Application.PathSeparator & "images" & Application.PathSeparator & Index & ".png"

theChart.Chart.Export endFileName
 
End Sub
 
Thanks! The path resolves properly to

"/Users/steven/Documents/Beekeeping/HiveWeight/images/1.png"

and the path separators are correct, because if I change /images/, which exists, to /images2/, which does not, then the error changes to Path Not Found.

I added Excel to the Full Disk Access list, but I still get the error.

So I took your suggestion about paths and just deleted it all:

endFileName = Index & ".png"

and now it runs, and puts all the PNGs at:

/Users/steven/Library/Containers/com.microsoft.Excel/Data/*.png

So it's progress, because now I don't have to round-trip this through a Windows box, and it runs about 10x faster on my Mac than on that old Windows box anyway.

But I'd really like it to go into the correct location.

edit: Console reports:

Sandbox: Microsoft Excel(55877) deny(1) file-write-create /Users/steven/Documents/Beekeeping/HiveWeight/images/1.png

and

ls -l /Users/steven/Documents/Beekeeping/HiveWeight/

reports:

drwxr-xr-x@ 3 steven staff 96 May 17 18:17 images
 
Last edited:
I haven’t checked if things have changed recently, but I don’t think there is a way around the sandboxing. I recall having a similar problem writing AppleScripts for Excel a few years ago (in my case, I think it was trying to get workbooks not to open in protected mode) and finding that the only place they opened correctly was in the MS Data folder.

Offhand, you could maybe put together an Automator action that would take files added to Data and move them to your desired directory.
 

gabemaroz

Ars Scholae Palatinae
1,287
There are a few directories that specifically require elevated privileges and usually throw an authorization request due to sandboxing. I believe Documents and Desktop are two of them. It’s likely VBA isn’t able to make that request and just fails. Perhaps try a different folder such as just:

~/images

And then add a folder action script attached to that folder to move it to the proper location. Or just do that straight away in the container folder as @Honeybog suggested.

You could also try:

chmod 777 /Users/steven/Documents/Beekeeping/HiveWeight/

to add write privileges to that folder and then try again with the original VB code. You might need to throw sudo at the front of that.
 
Last edited:
You could also try:

chmod 777 /Users/steven/Documents/Beekeeping/HiveWeight/

to add write privileges to that folder and then try again with the original VB code. You might need to throw sudo at the front of that.
I just sudo'ed this:

-rw-r--r--@ 1 steven staff 980 May 17 21:53 images

but I still get permission denied.

Yeah, I could use some scripting and folder actions to move the images to where I need them, but it's just a minor inconvenience at this point. The important part is getting everything processed locally, on this machine. Thanks @gabemaroz for the suggestion to change the location.

 
Is it possible to change the way the txt file is written on the Pi? Using a more widely used delimiter like a tab or a comma instead of a space between the values might help. Also you have some dashes in the data file which can also be used as a delimiter. I can't speak to how Excel is 'making decisions' here, but if you unify around a single delimiter it will most likely clear up the issue.
The weird thing is that my exact same behavior sometimes results in auto-conversion, and other times results in this:

1716054206891.png

It takes me 5 seconds to convert it manually, but I'd love to figure out why it doesn't do it automatically ~5% of the time.
As far as pushing the value to a Google Sheet. It's kind of off topic here. You can direct message me and I'd be happy to work through it with you. I've got a lot of experience with Apps Script, mostly for hobbyist type stuff. Or start a different thread since it's not really Office pertinent.

Edit: I'm 99% sure just throwing "How I can get my Raspberry Pi to write information to a Google Sheet" into ChatGPT will get you almost all the way there.
I have another thread, and I think my error has been pointed out. I just need to find a few minutes to re-create my credentials properly.

But I keep getting distracted by my Office questions 😂
 

gabemaroz

Ars Scholae Palatinae
1,287
I just sudo'ed this:

-rw-r--r--@ 1 steven staff 980 May 17 21:53 images
I’m not sure what happened but you want write permission for the user, group, and everyone. Also, the lack of a d (directory flag) at the beginning is concerning. Ideally for problem solving here you want:

drwxrwxrwx@ 1 steven staff 980 May 17 21:53 images
 

brazuca

Ars Praefectus
3,711
Subscriptor
The weird thing is that my exact same behavior sometimes results in auto-conversion, and other times results in this:

View attachment 80969

It takes me 5 seconds to convert it manually, but I'd love to figure out why it doesn't do it automatically ~5% of the time.

I have another thread, and I think my error has been pointed out. I just need to find a few minutes to re-create my credentials properly.

But I keep getting distracted by my Office questions 😂
At this point it’s probably better to use another tool to prepare the file. Python maybe? It will create the csv and you can open it in excel without a problem
 
  • Like
Reactions: gabemaroz

eisa01

Ars Scholae Palatinae
1,051
Subscriptor
What determines whether Excel automatically converts pasted text into columns or not?
Pretty sure it's your default system delimiter, and whatever you've set the "text to columns"-wizard to the last time

If it's from a .csv you can also do Data->Get Data (Power Query)->From Text (Legacy) to get a more robust interface.
(LibreOffice has a handy import interface when you open a .csv file, something that Microsoft should learn from...)
 
  • Like
Reactions: The Limey

papadage

Ars Legatus Legionis
41,731
Subscriptor++
Is there a script that can move sent items in Outlook to the Inbox for easier filing? On Windows, Outlook has more granular settings for saving sent emails.

The next project will be trying to duplicate Quick Steps without admin privileges.

OK, so the MacOS version of Outlook has Favorites folders that are easily accessible for quick filing, so I drag and drop the emails instead of trying to replicate Quick Steps. Now, is there a way to make this version of Outlook save Sent items to the Inbox? Rules don't seem to be able to do it.
 

Galberras

Ars Centurion
386
Subscriptor
You should try the holy trinity of evil software: a long word document with pictures, tables and text boxes embedded in the text and Endnote as the reference manager to create a bibliography. This evil concoction has me screaming at my iMac in no time. :mad:
Friends don’t let friends use Endnote. :judge:

… unless the coauthors of said friend demand Endnote.

I still remember how horrible former versions of Office were but I long for an update.

Also, anyone know if any of the python + excel goodies will make it to the Mac at some point?
 

typ993

Ars Praetorian
434
Subscriptor
Friends don’t let friends use Endnote. :judge:

… unless the coauthors of said friend demand Endnote.

I still remember how horrible former versions of Office were but I long for an update.

Also, anyone know if any of the python + excel goodies will make it to the Mac at some point?
The xlwings developer (Python add-in for Excel) had this to say about those goodies. Spoiler: the way MS implemented this feature has a lot of flaws.