docs: function write_biff8_global(wb, bufs, opts) {
  	var A = buf_array();
  	var _WB = ((wb||{}).Workbook||{});
  	var _sheets = (_WB.Sheets||[]);
  	var _wb = _WB.WBProps||{};
  	var b8 = opts.biff == 8, b5 = opts.biff == 5;
  	write_biff_rec(A, 0x0809, write_BOF(wb, 0x05, opts));
  	if(opts.bookType == "xla") write_biff_rec(A, "Addin");
  	write_biff_rec(A, "InterfaceHdr", b8 ? writeuint16(0x04b0) : null);
  	write_biff_rec(A, "Mms", writezeroes(2));
  	if(b5) write_biff_rec(A, "ToolbarHdr");
  	if(b5) write_biff_rec(A, "ToolbarEnd");
  	write_biff_rec(A, "InterfaceEnd");
  	write_biff_rec(A, "WriteAccess", write_WriteAccess("SheetJS", opts));
  	write_biff_rec(A, "CodePage", writeuint16(b8 ? 0x04b0 : 0x04E4));
  	if(b8) write_biff_rec(A, "DSF", writeuint16(0));
  	if(b8) write_biff_rec(A, "Excel9File");
  	write_biff_rec(A, "RRTabId", write_RRTabId(wb.SheetNames.length));
  	if(b8 && wb.vbaraw) {
  		write_biff_rec(A, "ObProj");
  		var cname = _wb.CodeName || "ThisWorkbook";
  		write_biff_rec(A, "CodeName", write_XLUnicodeString(cname, opts));
  	}
  	write_biff_rec(A, "BuiltInFnGroupCount", writeuint16(0x11));
  	write_biff_rec(A, "WinProtect", writebool(false));
  	write_biff_rec(A, "Protect", writebool(false));
  	write_biff_rec(A, "Password", writeuint16(0));
  	if(b8) write_biff_rec(A, "Prot4Rev", writebool(false));
  	if(b8) write_biff_rec(A, "Prot4RevPass", writeuint16(0));
  	write_biff_rec(A, "Window1", write_Window1(opts));
  	write_biff_rec(A, "Backup", writebool(false));
  	write_biff_rec(A, "HideObj", writeuint16(0));
  	write_biff_rec(A, "Date1904", writebool(safe1904(wb)=="true"));
  	write_biff_rec(A, "CalcPrecision", writebool(true));
  	if(b8) write_biff_rec(A, "RefreshAll", writebool(false));
  	write_biff_rec(A, "BookBool", writeuint16(0));
  	/* ... */
  	write_FONTS_biff8(A, wb, opts);
  	write_FMTS_biff8(A, wb.SSF, opts);
  	write_CELLXFS_biff8(A, opts);
  	/* ... */
  	if(b8) write_biff_rec(A, "UsesELFs", writebool(false));
  	var a = A.end();
  
  	var C = buf_array();
  	if(b8) write_biff_rec(C, "Country", write_Country());
  	/* BIFF8: [SST *Continue] ExtSST */
  	write_biff_rec(C, "EOF");
  	var c = C.end();
  
  	var B = buf_array();
  	var blen = 0, j = 0;
  	for(j = 0; j < wb.SheetNames.length; ++j) blen += (b8 ? 12 : 11) + (b8 ? 2 : 1) * wb.SheetNames[j].length;
  	var start = a.length + blen + c.length;
  	for(j = 0; j < wb.SheetNames.length; ++j) {
  		var _sheet = _sheets[j] || ({});
  		write_biff_rec(B, "BoundSheet8", write_BoundSheet8({pos:start, hs:_sheet.Hidden||0, dt:0, name:wb.SheetNames[j]}, opts));
  		start += bufs[j].length;
  	}
  	/* 1*BoundSheet8 */
  	var b = B.end();
  	if(blen != b.length) throw new Error("BS8 " + blen + " != " + b.length);
  
  	var out = [];
  	if(a.length) out.push(a);
  	if(b.length) out.push(b);
  	if(c.length) out.push(c);
  	return __toBuffer([out]);
  }