First install the B computer printer driver on a computer, then open the Excel workbook that needs to be printed, bring up the Printer selection dialog box, set the printer to the printer on the B computer, and then select the Print to File option and press the "Print" button
After you enter a filename (such as A.PRN) in the Print to File dialog box that pops up, press the Save button.
Next, copy the a.prn file to Computer B, and in the Windows Command Prompt window, switch to the directory where the file is located with the CD command, and print the Excel worksheet by performing the copy a.prn LPT1 command.
Note: The LPT1 here is the printer port number, and when used, it needs to be changed according to the actual situation of the printer port being connected.
Of course, there's another way to do that without Excel, with a lightweight WPS Office that can also print compatible Excel tables. In addition, if you are on a local area network and share a remote printer, you can also print the document directly on the remote printer.