Saturday 19 August 2017

ศูนย์กลางการ เคลื่อนไหว ค่าเฉลี่ย Xls


พฤษภาคม 2015 การจ้างงานและค่าจ้างแห่งชาติในสหรัฐอเมริกาประมาณการเหล่านี้คำนวณจากข้อมูลที่เก็บรวบรวมจากนายจ้างในทุกภาคอุตสาหกรรมในเขตนครหลวงและนอกเขตเมืองในทุกรัฐและ District of Columbia ข้อมูลเพิ่มเติมรวมทั้งค่าจ้างรายปี 10, 25, 75, และ 90 ปีและข้อผิดพลาดมาตรฐานข้อผิดพลาดในการจ้างงานมีอยู่ในไฟล์ XLS ที่สามารถดาวน์โหลดได้ กลุ่มอาชีพหลัก (หมายเหตุ - การคลิกที่ลิงค์จะเลื่อนหน้าไปยังกลุ่มอาชีพ): เมื่อต้องการจัดเรียงตารางนี้ตามคอลัมน์อื่นให้คลิกที่ส่วนหัวของคอลัมน์ชื่อเรื่องอาชีพ (คลิกที่ชื่ออาชีพเพื่อดูประวัติ) (1) ค่าประมาณสำหรับการประกอบอาชีพโดยละเอียดไม่รวมกับผลรวมเนื่องจากผลรวมรวมถึงการประกอบอาชีพที่ไม่ได้แสดงแยกต่างหาก ค่าประมาณไม่รวมถึงคนทำงานที่ประกอบอาชีพอิสระ (2) ค่าจ้างรายปีคำนวณโดยการคูณค่าจ้างเฉลี่ยรายชั่วโมงโดยใช้รูปสี่เหลี่ยมผืนผ้าจำนวนชั่วโมงทั้งสิ้น 2,080 ชั่วโมงสำหรับการประกอบอาชีพดังกล่าวซึ่งไม่ได้มีการประกาศรายชั่วโมงค่าจ้างรายปีได้รับการคำนวณโดยตรงจากรายงาน ข้อมูลการสำรวจ (3) ข้อผิดพลาดมาตรฐานสัมพัทธ์ (RSE) เป็นตัวชี้วัดความน่าเชื่อถือของสถิติการสำรวจ ข้อผิดพลาดมาตรฐานที่มีขนาดเล็กยิ่งทำให้ประมาณการได้แม่นยำมากขึ้น (4) ค่าจ้างสำหรับบางอาชีพที่ไม่ได้ทำงานโดยทั่วไปตลอดทั้งปีเต็มเวลาจะมีการรายงานเป็นค่าจ้างรายชั่วโมงหรือเงินเดือนประจำปีขึ้นอยู่กับวิธีที่พวกเขามักจะได้รับเงิน (5) ค่าจ้างนี้มีค่าเท่ากับหรือมากกว่า 90.00 ต่อชั่วโมงหรือ 187,200 ต่อปี วันที่แก้ไขล่าสุด: 30 มีนาคม 2016 แนะนำหน้านี้โดยใช้: Facebook Twitter LinkedInOhio University Heritage College of Osteopathic Medicine การเรียนรู้ด้วยความระมัดระวังในแต่ละปีนักเรียนของเราจะเข้าสู่ชั่วโมงอาสาสมัครมากกว่า 4,500 ชั่วโมงที่โรงเรียนในท้องถิ่นคลินิกและชุมชนอื่น ๆ พวกเขาได้รับข้อมูลเชิงลึกโดยตรงในการดูแลปฐมภูมิและประสบการณ์ที่แตกต่างกันที่พวกเขาสามารถทำเพื่อบุคคลและทั้งชุมชน ให้บริการแก่เพื่อนบ้านที่ต้องการโดยบุคลากรทางการแพทย์ที่ได้รับการฝึกอบรมมาเป็นอย่างดีคลินิก Heritage Community Clinic เปิดเมื่อเร็ว ๆ นี้เปิดให้ประชาชนชาวโอไฮโอตอนใต้ที่ต้องการความห่วงใยมากที่สุด คลินิกให้บริการฟรีสำหรับการตรวจสุขภาพที่มีคุณภาพต่ำการฉีดวัคซีนการสอบการรักษาโรคเบาหวานและการดูแลพิเศษอื่น ๆ การเขียนสตริงการจัดรูปแบบสตริงจำนวนและสูตรลงในแผ่นงานแรกในสมุดงาน Excel ที่เรียกว่า perl. xlsx: Excel :: Writer :: โมดูล XLSX สามารถใช้เพื่อสร้างไฟล์ Excel ในรูปแบบ XLSX 2007 รูปแบบ XLSX คือรูปแบบ Office Open XML (OOXML) ที่ใช้โดย Excel 2007 และรุ่นใหม่กว่า คุณสามารถเพิ่มเวิร์กชีทหลายแผ่นลงในสมุดงานและสามารถใช้รูปแบบกับเซลล์ได้ ข้อความตัวเลขและสูตรสามารถเขียนลงในเซลล์ได้ โมดูลนี้ยังไม่สามารถใช้ในการเขียนไฟล์ Excel XLSX ที่มีอยู่ได้ Excel :: Writer :: XLSX ใช้อินเทอร์เฟซเดียวกันกับโมดูล Spreadsheet :: WriteExcel ซึ่งสร้างไฟล์ Excel ในรูปแบบไบนารี XLS Excel :: Writer :: XLSX สนับสนุนคุณลักษณะทั้งหมดของ Spreadsheet :: WriteExcel และในบางกรณีมีฟังก์ชันเพิ่มเติม สำหรับรายละเอียดเพิ่มเติมดู 34 การเข้ากันได้กับ Spreadsheet :: WriteExcel34 ข้อดีหลักของรูปแบบ XLSX ในรูปแบบ XLS คืออนุญาตจำนวนแถวและคอลัมน์ในแผ่นงานได้มากขึ้น รูปแบบไฟล์ XLSX ยังผลิตไฟล์ขนาดเล็กกว่ารูปแบบไฟล์ XLS Excel :: Writer :: XLSX พยายามให้ส่วนติดต่อกับคุณลักษณะต่างๆของ Excel ให้ได้มากที่สุด เป็นผลให้มีจำนวนมากเอกสารประกอบกับอินเตอร์เฟซและมันอาจเป็นเรื่องยากได้อย่างรวดเร็วก่อนเพื่อดูสิ่งที่สำคัญและสิ่งที่ไม่ ดังนั้นสำหรับคุณที่ต้องการประกอบเฟอร์นิเจอร์ Ikea ก่อนจากนั้นอ่านคำแนะนำต่อไปนี้เป็นสามขั้นตอนง่ายๆ: 1. สร้างสมุดงาน Excel ใหม่ (เช่นไฟล์) โดยใช้ new () 2. เพิ่มเวิร์กชีทลงในเวิร์กบุคใหม่โดยใช้ addworksheet () 3. เขียนลงในเวิร์กชีทโดยใช้ write () ซึ่งจะเป็นการสร้างไฟล์ Excel ที่เรียกว่า perl. xlsx พร้อมกับแผ่นงานเดียวและข้อความ 39Hi Excel39 ในเซลล์ที่เกี่ยวข้อง และนั่นก็คือ เอาล่ะมีขั้นตอนที่เป็นจริงเช่นกัน แต่ใช้โมดูลไปโดยไม่พูด มีตัวอย่างมากมายที่มาพร้อมกับการแจกจ่ายและคุณสามารถใช้เพื่อช่วยให้คุณเริ่มต้นได้ ดู 34EXAMPLES34 บรรดาผู้ที่อ่านคำแนะนำก่อนและประกอบเฟอร์นิเจอร์หลังจากนั้นจะรู้วิธีดำเนินการ -) โมดูล Excel :: Writer :: XLSX มีอินเทอร์เฟซเชิงวัตถุไปยังสมุดงาน Excel ใหม่ มีวิธีการต่อไปนี้ผ่านสมุดงานใหม่ ถ้าคุณไม่คุ้นเคยกับอินเทอร์เฟซเชิงวัตถุหรือวิธีการที่ใช้ใน Perl ดู perlobj และ perltoot ในเอกสาร Perl หลัก สมุดงาน Excel ใหม่จะถูกสร้างขึ้นโดยใช้นวกรรมิกใหม่ () ซึ่งยอมรับชื่อไฟล์หรือ filehandle เป็นพารามิเตอร์ ตัวอย่างต่อไปนี้จะสร้างไฟล์ Excel ใหม่ขึ้นอยู่กับชื่อไฟล์: ต่อไปนี้คือตัวอย่างอื่น ๆ ของการใช้ new () ที่มีชื่อไฟล์: ตัวอย่างสองตัวอย่างล่าสุดแสดงให้เห็นถึงวิธีการสร้างไฟล์ใน DOS หรือ Windows ซึ่งจำเป็นต้องหนีไดเร็กทอรี separator หรือใช้เครื่องหมายคำพูดเดียวเพื่อให้แน่ใจว่าไม่มีการสอดแทรก สำหรับข้อมูลเพิ่มเติมโปรดดูที่ perlfaq5: ทำไมฉันไม่สามารถใช้ 34C: tempfoo34 ในเส้นทาง DOS ได้ ขอแนะนำให้ใช้ชื่อไฟล์นามสกุล. xlsx แทน. xls เนื่องจากคำหลังดังกล่าวเป็นคำเตือนของ Excel เมื่อใช้กับรูปแบบ XLSX ตัวสร้างใหม่ () จะคืนค่าออบเจกต์ Excel :: Writer :: XLSX ที่คุณสามารถใช้เพื่อเพิ่มเวิร์กชีทและเก็บข้อมูล ควรสังเกตว่าแม้ว่าฉันไม่จำเป็นต้องเป็นพิเศษมันกำหนดขอบเขตของตัวแปรสมุดงานใหม่และในกรณีส่วนใหญ่ทำให้แน่ใจว่าสมุดงานจะปิดอย่างถูกต้องโดยไม่ต้องเรียกวิธีปิด () อย่างชัดเจน หากไม่สามารถสร้างไฟล์ได้เนื่องจากสิทธิ์ของไฟล์หรือเหตุผลอื่น ๆ ระบบใหม่จะคืนค่า undef ดังนั้นจึงเป็นวิธีที่ดีในการตรวจสอบค่าตอบแทนของใหม่ก่อนที่จะดำเนินการ ตามปกติตัวแปร Perl จะถูกตั้งค่าหากมีข้อผิดพลาดในการสร้างไฟล์ นอกจากนี้คุณยังจะเห็นข้อความแจ้งเตือนรายละเอียดใน 34DIAGNOSTICS34: นอกจากนี้คุณยังสามารถส่งผ่านไฟล์ที่ถูกต้องไปยังตัวสร้างใหม่ () ตัวอย่างเช่นในโปรแกรม CGI คุณสามารถทำสิ่งต่อไปนี้: ความต้องการสำหรับ binmode () จะอธิบายด้านล่าง ดูเพิ่มเติมโปรแกรม cgi. pl ในไดเร็กทอรีตัวอย่างของ distro ในโปรแกรม modperl ที่คุณจะต้องทำสิ่งต่างๆดังต่อไปนี้ดูที่โปรแกรม modperl1.pl และ modperl2.pl ในไดเร็กทอรีตัวอย่างของ distro Filehandles ยังสามารถเป็นประโยชน์ถ้าคุณต้องการสตรีมไฟล์ Excel ผ่านซ็อกเก็ตหรือถ้าคุณต้องการเก็บไฟล์ Excel ไว้ในรูปแบบ Scalar ตัวอย่างเช่นนี่คือวิธีการเขียนไฟล์ Excel เป็นแบบสเกลาร์: ดูที่โปรแกรม writetoscalar. pl และ filehandle. pl ในไดเร็กทอรีตัวอย่างของ distro หมายเหตุเกี่ยวกับข้อกำหนดสำหรับ binmode () ไฟล์ Excel ประกอบด้วยข้อมูลไบนารี ดังนั้นถ้าคุณใช้ filehandle คุณควรตรวจสอบให้แน่ใจว่าคุณ binmode () ก่อนที่จะส่งผ่านไปยัง new () คุณควรทำเช่นนี้ไม่ว่าคุณจะอยู่บนแพลตฟอร์ม Windows หรือไม่ก็ตาม คุณไม่ต้องกังวลเกี่ยวกับ binmode () ถ้าคุณใช้ชื่อไฟล์แทนการจัดการไฟล์ Excel :: Writer :: XLSX ดำเนินการ binmode () ภายในเมื่อแปลงชื่อไฟล์เป็น filehandle สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ binmode () ดู perlfunc และ perlopentut ในเอกสาร Perl หลัก ควรเพิ่มเวิร์กชีทอย่างน้อยหนึ่งแผ่นลงในสมุดงานใหม่ แผ่นงานจะใช้ในการเขียนข้อมูลลงในเซลล์: ถ้าไม่มีการระบุชื่อ sheetName จะมีการดำเนินการตามค่าเริ่มต้นของ Excel เช่น Sheet1, Sheet2 เป็นต้นชื่อเวิร์กชีตต้องเป็นชื่อแผ่นงาน Excel ที่ถูกต้องนั่นคือไม่สามารถมีอักขระใด ๆ ต่อไปนี้ได้ ,. . และต้องมีอักขระไม่เกิน 32 ตัว นอกจากนี้คุณยังไม่สามารถใช้ sheetName เดียวกันกับตัวพิมพ์เล็กและตัวพิมพ์ใหญ่ได้มากกว่าหนึ่งแผ่น เมธอด addformat () สามารถใช้เพื่อสร้างอ็อบเจ็กต์ฟอร์แมตใหม่ที่ใช้เพื่อใช้การฟอร์แมตกับเซลล์ คุณสามารถกำหนดคุณสมบัติในเวลาที่สร้างผ่านการใช้ค่าแฮชของค่าคุณสมบัติหรือภายหลังโดยใช้การเรียกเมธอด ดูหัวข้อ 34CELL FORMATTING34 สำหรับรายละเอียดเพิ่มเติมเกี่ยวกับคุณสมบัติของฟอร์แมตและวิธีตั้งค่า วิธีนี้ใช้สำหรับสร้างแผนภูมิใหม่เป็นแผ่นงานแบบสแตนด์อโลน (ค่าดีฟอลต์) หรือเป็นอ็อบเจกต์ฝังตัวซึ่งสามารถแทรกลงในเวิร์กชีทได้โดยใช้วิธีแผ่นงาน () Workscheck คุณสมบัติที่สามารถตั้งค่าคือ: นี่คือพารามิเตอร์ที่ต้องการ กำหนดประเภทของแผนภูมิที่จะสร้างขึ้น ประเภทที่ใช้ได้คือ: ใช้เพื่อกำหนดชนิดย่อยแผนภูมิที่มี ดูเอกสาร Excel :: Writer :: XLSX :: Chart สำหรับรายการแผนภูมิย่อยที่พร้อมใช้งาน ตั้งชื่อแผ่นงานแผนภูมิ คุณสมบัติ name เป็นตัวเลือกและถ้าไม่มีให้ก็จะมีค่าเริ่มต้นเป็น Chart1 n ชื่อต้องเป็นชื่อแผ่นงาน Excel ที่ถูกต้อง ดู addworksheet () เพื่อดูรายละเอียดเพิ่มเติมเกี่ยวกับชื่อแผ่นงานที่ถูกต้อง คุณสามารถละเว้นคุณสมบัติ name ได้สำหรับแผนภูมิที่ฝัง ระบุว่าออบเจ็กต์ Chart จะแทรกลงในเวิร์กชีทโดยใช้วิธีแผ่นงาน () Workscheck ข้อผิดพลาดในการลองแทรกแผนภูมิที่ไม่มีการตั้งค่าสถานะนี้ ดู Excel :: Writer :: XLSX :: Chart เพื่อดูรายละเอียดเกี่ยวกับวิธีการกำหนดค่าอ็อบเจ็กต์แผนภูมิเมื่อสร้างขึ้น ดูที่โปรแกรม chart. pl ในไดเร็กทอรีตัวอย่างของ distro คุณสามารถใช้เมธอด addshape () เพื่อสร้างรูปร่างใหม่ที่อาจแทรกลงในเวิร์กชีท คุณสามารถกำหนดคุณสมบัติในเวลาที่สร้างผ่านการใช้ค่าแฮชของค่าคุณสมบัติหรือภายหลังโดยใช้การเรียกเมธอด ดู Excel :: Writer :: XLSX :: Shape สำหรับรายละเอียดเกี่ยวกับวิธีการกำหนดค่าออบเจครูปร่างเมื่อสร้างขึ้น ดูที่โปรแกรม shap. pl ในไดเร็กทอรีตัวอย่างของ distro คุณสามารถใช้เมธอด addvbaproject () เพื่อเพิ่มมาโครหรือฟังก์ชันลงในไฟล์ Excel :: Writer :: XLSX โดยใช้ไฟล์โครงการไบต์ VBA ที่ถูกดึงออกจากไฟล์ Excel xlsm ที่มีอยู่ โปรแกรมอรรถประโยชน์ extractvba ที่ให้มานี้สามารถใช้เพื่อแยกไฟล์ vbaProject. bin ที่ต้องการได้จากไฟล์ Excel ที่มีอยู่: แมโครสามารถเชื่อมโยงกับปุ่มโดยใช้วิธีการแทรกแผ่นงาน () (ดูที่ส่วน 34WORKSHEET METHODS34 สำหรับรายละเอียด): หมายเหตุ Excel ใช้ไฟล์ นามสกุล xlsm แทน xlsx สำหรับไฟล์ที่มีมาโคร ควรทำตามแนวทางเดียวกัน setvbaname () method สามารถใช้เพื่อกำหนด VBA codename สำหรับสมุดงาน บางครั้งก็จำเป็นต้องใช้เมื่อแมโคร vbaProject รวมผ่านทาง addvbaproject () หมายถึงสมุดงาน ชื่อ Excel VBA เริ่มต้นของ ThisWorkbook จะใช้หากระบุชื่อผู้ใช้ที่ระบุ isn39t ดูเพิ่มเติมที่ 34WORKING WITH VBA MACROS34 โดยทั่วไปไฟล์ Excel ของคุณจะถูกปิดโดยอัตโนมัติเมื่อโปรแกรมของคุณสิ้นสุดลงหรือเมื่อเวิร์กบุควัตถุหมดขอบเขต แต่วิธีปิด () สามารถใช้เพื่อปิดไฟล์ Excel ได้อย่างชัดเจน ต้องปิดอย่างชัดเจน () หากไฟล์ต้องถูกปิดก่อนดำเนินการบางอย่างจากภายนอกเช่นคัดลอกอ่านขนาดหรือแนบไปกับอีเมล นอกจากนี้อาจต้องปิด () เพื่อป้องกันไม่ให้ผู้รวบรวมขยะของ perl เก็บเอกสาร Workbook, Worksheet และ Format ในลำดับที่ไม่ถูกต้อง สถานการณ์ที่เกิดเหตุการณ์นี้อาจเกิดขึ้นได้: ถ้า my () ไม่ได้ใช้เพื่อประกาศขอบเขตของตัวแปรสมุดงานที่สร้างขึ้นโดยใช้ new () ถ้าใหม่ () addworksheet () หรือ addformat () ถูกเรียกใน subroutines สาเหตุนี้คือ Excel :: Writer :: XLSX ใช้กลไก DESTROY ของ Perl เพื่อเรียกใช้วิธี destructor ในลำดับที่เฉพาะเจาะจง กรณีนี้อาจไม่เกิดขึ้นในกรณีที่ตัวแปร Workbook, Worksheet และ Format ไม่ได้อยู่ในขอบเขต lexically หรือที่พวกเขามีขอบเขตศัพท์ที่แตกต่างกัน โดยทั่วไปถ้าคุณสร้างไฟล์ที่มีขนาด 0 ไบต์หรือคุณไม่สามารถสร้างไฟล์ที่คุณต้องการจะเรียก close () ค่าที่ส่งคืนของ close () เป็นค่าเดียวกับที่ส่งกลับโดย perl เมื่อปิดไฟล์ที่สร้างโดย new () นี้ช่วยให้คุณสามารถจัดการกับเงื่อนไขข้อผิดพลาดในวิธีปกติ: วิธีการตั้งค่า () สามารถใช้เพื่อกำหนดขนาดของหน้าต่างสมุดงาน ขนาดหน้าต่าง Excel ถูกใช้ใน Excel 2007 เพื่อกำหนดความกว้างและความสูงของหน้าต่างสมุดงานภายในอินเทอร์เฟซเอกสารหลาย (MDI) ใน Excel รุ่นที่ใหม่กว่าสำหรับ Windows อินเทอร์เฟซนี้ถูกทิ้ง วิธีนี้เป็นประโยชน์อย่างมากเมื่อตั้งค่าขนาดหน้าต่างใน Excel สำหรับ Mac 2011. หน่วยเป็นพิกเซลและขนาดดีฟอลต์คือ 1073 x 644 หมายเหตุไม่เท่ากับว่าตรงกับขนาดพิกเซลของ Excel for Mac เพราะเป็นไปตามต้นฉบับ Excel 2007 สำหรับ Windows ขนาด คุณสามารถใช้เมธอด setproperties เพื่อกำหนดคุณสมบัติเอกสารของไฟล์ Excel ที่สร้างขึ้นโดย Excel :: Writer :: XLSX คุณสมบัติเหล่านี้จะปรากฏขึ้นเมื่อคุณใช้ Office Button -62 Prepare -62 Properties ใน Excel และสามารถใช้งานกับโปรแกรมภายนอกที่อ่านหรือทำดัชนีไฟล์ Windows ได้ คุณสมบัติควรถูกส่งผ่านในรูปแบบแฮชเป็นดังนี้: คุณสมบัติที่สามารถตั้งค่าได้คือ: ดูที่โปรแกรม properties. pl ในไดเร็กทอรีตัวอย่างของ distro คุณสามารถใช้เมธอด setcustomproperty เพื่อกำหนดคุณสมบัติเอกสารที่กำหนดเองได้มากกว่าหนึ่งชุดที่ไม่ครอบคลุมโดยเมธอด setproperties () ข้างต้น คุณสมบัติเหล่านี้สามารถมองเห็นได้เมื่อคุณใช้ Office Button -62 Prepare -62 Properties -62 Advanced Properties -62 Custom ใน Excel และยังมีให้สำหรับโปรแกรมภายนอกที่อ่านหรือทำดัชนีไฟล์ Windows เมธอด setcustomproperty ใช้เวลา 3 พารามิเตอร์ ได้แก่ ช่วงวันที่ที่มีอยู่คือวันที่ควรเป็นตามรูปแบบวันที่ ISO8601 yyyy-mm-ddThh: mm: ss. sssZ ในเวลา Zulu ดังที่แสดงไว้ด้านบน ข้อความและประเภทตัวเลขเป็นตัวเลือกเนื่องจากสามารถอนุมานได้จากข้อมูล: ชื่อและค่าพารามิเตอร์ถูก จำกัด ไว้ที่ 255 อักขระโดย Excel วิธีนี้ใช้เพื่อกำหนดชื่อที่สามารถใช้เพื่อแสดงค่าเซลล์เดียวหรือช่วงของเซลล์ในสมุดงาน ตัวอย่างเช่นเพื่อตั้งชื่อ globalworkbook: นอกจากนี้คุณยังสามารถกำหนดชื่อ localworksheet โดยใช้คำนำหน้าชื่อด้วยชื่อแผ่นงานโดยใช้ไวยากรณ์ sheetnamedefinedname: หากชื่อแผ่นงานประกอบด้วยช่องว่างหรืออักขระพิเศษคุณต้องใส่ไว้ในเครื่องหมายคำพูดแบบเดียวเช่นใน Excel: ดูโปรแกรม definename. pl ในตัวอย่างไดเร็กทอรี distro Excel :: Writer :: XLSX จัดเก็บข้อมูลแผ่นงานในไฟล์ชั่วคราวก่อนที่จะทำการรวบรวมสมุดงานขั้นสุดท้าย โมดูล File :: Temp ใช้เพื่อสร้างไฟล์ชั่วคราวเหล่านี้ แฟ้ม :: Temp ใช้ File :: Spec เพื่อกำหนดตำแหน่งที่เหมาะสมสำหรับแฟ้มเหล่านี้เช่น tmp หรือ c: windowstemp คุณสามารถหาไดเร็กทอรีที่ใช้ในระบบของคุณได้ดังต่อไปนี้: ถ้าไดเร็กทอรีไฟล์ชั่วคราวดีฟอลต์ไม่สามารถเข้าถึงแอพพลิเคชันของคุณหรือไม่มีพื้นที่เพียงพอคุณสามารถระบุตำแหน่งที่ตั้งอื่นโดยใช้เมธอด settempdir (): ไดเรกทอรีสำหรับชั่วคราว ต้องมีอยู่ settempdir () จะไม่สร้างไดเร็กทอรีใหม่ วิธีนี้ได้รับการปรับปรุงให้เข้ากันได้กับ Spreadsheet :: WriteExcel Excel :: Writer :: โปรแกรม XLSX don39t ต้องการวิธีนี้และสีสามารถระบุได้โดยใช้ค่า RRGGBB สไตล์แบบ Html ดูที่ 34WORKING WITH COLOURS34 เมธอด sheet () จะแสดงรายการหรือรายการแบบแบ่งชิ้นส่วนของเวิร์กชีทในสมุดงาน ถ้าอาร์กิวเมนต์ไม่มีการส่งผ่านวิธีการส่งกลับรายการของแผ่นงานทั้งหมดในสมุดงาน นี่เป็นประโยชน์ถ้าคุณต้องการทำซ้ำการดำเนินการในแผ่นงานแต่ละแผ่น: นอกจากนี้คุณยังสามารถระบุรายการชิ้นเพื่อกลับวัตถุเวิร์กชีทอย่างน้อยหนึ่งรายการ: หรือเนื่องจากค่าที่ส่งคืนจากแผ่นงาน () เป็นข้อมูลอ้างอิงไปยังวัตถุแผ่นงานที่คุณสามารถเขียนด้านบนได้ ตัวอย่างเช่น: ตัวอย่างต่อไปนี้จะส่งกลับแผ่นงานแรกและครั้งสุดท้ายในสมุดงาน: ชิ้นส่วน Array ถูกอธิบายไว้ใน manpage perldata ฟังก์ชัน getworksheetbyname () จะคืนเวิร์กชีทหรือวัตถุชีทแผนภูมิในเวิร์กบุคโดยใช้ sheetname: Excel เก็บวันที่เป็นตัวเลขจริงซึ่งส่วนจำนวนเต็มเก็บจำนวนวันนับตั้งแต่ยุคและส่วนที่เป็นเศษส่วนจัดเก็บเปอร์เซ็นต์ของวัน ยุคสามารถเป็นได้ทั้งปี 1900 หรือ 1904 Excel สำหรับ Windows ใช้ 1900 และ Excel สำหรับ Macintosh ใช้ 1904 อย่างไรก็ตาม Excel บนแพลตฟอร์มใดจะแปลงโดยอัตโนมัติระหว่างระบบหนึ่งและอีกระบบหนึ่ง Excel :: Writer :: XLSX จัดเก็บวันที่ในรูปแบบ 1900 โดยค่าเริ่มต้น ถ้าคุณต้องการเปลี่ยนแปลงนี้คุณสามารถเรียกใช้วิธีการสมุดงาน set1904 () คุณสามารถค้นหาค่าปัจจุบันโดยการเรียกเมธอดสมุดงาน get1904 () ค่านี้ส่งกลับ 0 สำหรับ 1900 และ 1 สำหรับ 1904 ดูเพิ่มเติม 34 วันและเวลาใน EXCEL34 สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการทำงานกับระบบวันที่ของ Excel โดยทั่วไปคุณอาจต้องใช้ set1904 () เมธอด setoptimization () ใช้เพื่อเปิดการเพิ่มประสิทธิภาพในโมดูล Excel :: Writer :: XLSX ขณะนี้มีเพียงหนึ่งการเพิ่มประสิทธิภาพที่มีอยู่และนั่นคือการลดการใช้หน่วยความจำ โปรดทราบว่าเมื่อมีการเพิ่มประสิทธิภาพนี้เปิดแถวข้อมูลถูกเขียนขึ้นและถูกละทิ้งเมื่อมีการเพิ่มเซลล์ในแถวใหม่ผ่านทางหนึ่งใน Worksheet write () method เนื่องจากข้อมูลดังกล่าวควรได้รับการเขียนตามลำดับแถวเมื่อมีการเปิดใช้งานการเพิ่มประสิทธิภาพ ต้องเรียกใช้เมธอดนี้ก่อนที่จะโทรไปที่ addworksheet () ตั้งค่าโหมดคำนวณสูตรในสมุดงาน นี่คือส่วนใหญ่ของการใช้งานสำหรับสมุดงานที่มีสูตรที่ช้าที่คุณต้องการให้ผู้ใช้สามารถคำนวณได้ด้วยตนเอง พารามิเตอร์โหมดสามารถเป็นสตริงต่อไปนี้: ค่าดีฟอลต์ Excel จะคำนวณสูตรใหม่เมื่อสูตรหรือค่าที่มีผลต่อสูตรเปลี่ยนแปลง คำนวณสูตรเฉพาะเมื่อผู้ใช้ต้องการเท่านั้น โดยทั่วไปโดยการกด F9 Excel จะคำนวณสูตรใหม่ยกเว้นตาราง สร้างเวิร์กชีทใหม่ด้วยการเรียกเมธอด addworksheet () จากวัตถุในสมุดงาน: วิธีการดังต่อไปนี้สามารถใช้งานได้จากแผ่นงานใหม่: Excel :: Writer :: XLSX สนับสนุนรูปแบบสองแบบเพื่อกำหนดตำแหน่งของเซลล์: สัญกรณ์แถวแถว และสัญกรณ์ A1 สัญกรณ์แถวคอลัมน์ใช้ดัชนี zero-based สำหรับทั้งแถวและคอลัมน์ขณะที่สัญกรณ์ A1 ใช้ลำดับเลขมาตรฐานของ Excel Alphabet มาตรฐานของคอลัมน์และแถวที่ใช้ 1 ตัวอย่างเช่น: สัญกรณ์แถว - คอลัมน์มีประโยชน์ถ้าคุณอ้างถึงเซลล์โดยทางโปรแกรม: โน้ต A1 มีประโยชน์สำหรับการตั้งค่าแผ่นงานด้วยตนเองและสำหรับการทำงานกับสูตร: ในสูตรและวิธีการที่เหมาะสมคุณสามารถใช้ A: สัญกรณ์ของคอลัมน์: Excel :: Writer :: XLSX :: โมดูลยูทิลิตี้ที่มีอยู่ใน distro มีฟังก์ชันช่วยเหลือสำหรับจัดการกับสัญกรณ์ A1 ตัวอย่างเช่น: เพื่อความเรียบง่ายรายการพารามิเตอร์สำหรับวิธีเวิร์กชีทที่เรียกใช้ในส่วนต่อไปนี้จะแสดงในแถว สัญกรณ์คอลัมน์ ในทุกกรณีก็ยังสามารถใช้สัญกรณ์ A1 หมายเหตุ: ใน Excel คุณสามารถใช้สัญกรณ์ R1C1 ได้เช่นกัน สิ่งนี้ไม่ได้รับการสนับสนุนโดย Excel :: Writer :: XLSX Excel ทำให้ความแตกต่างระหว่างชนิดข้อมูลเช่นสตริงตัวเลขช่องว่างสูตรและการเชื่อมโยงหลายมิติ เพื่อให้กระบวนการเขียนข้อมูลง่ายขึ้นวิธี write () ทำหน้าที่เป็นนามแฝงโดยทั่วไปสำหรับวิธีการที่เจาะจงมากขึ้น: กฎทั่วไปคือถ้าข้อมูลมีลักษณะคล้ายกับบางสิ่งบางอย่าง ต่อไปนี้คือตัวอย่างบางส่วนในทั้งสองแถว - คอลัมน์และสัญกรณ์ A1: กฎ 34 ดูกฎ like34 ถูกกำหนดโดยนิพจน์ปกติ: writenumber () ถ้าโทเค็นเป็นตัวเลขที่อิงตาม regex ต่อไปนี้: token writestring () ถ้ามีการตั้งค่า keepleadingzeros () และโทเค็น จำนวนเต็มที่มีศูนย์นำหน้าโดยขึ้นอยู่กับ regex ต่อไปนี้: token writeblank () ถ้าโทเค็นเป็น undef หรือสตริงว่าง: undef 3434 หรือ 3939 writeurl () ถ้าโทเค็นเป็น http, https, ftp หรือ mailto URL ที่ขึ้นอยู่กับ regexes ต่อไปนี้: โทเค็น mf หรือ writeurl โทเค็น () ถ้าโทเค็นเป็นเอกสารอ้างอิงภายในหรือภายนอกโดยอิงจาก regex ต่อไปนี้: token writeformula () ถ้าเป็นครั้งแรก ลักษณะของโทเค็นคือ 3434 writearrayformula () ถ้าโทเค็นตรงกัน writerow () ถ้าโทเค็นเป็นอาร์เรย์ ref writecol () ถ้าโทเค็นเป็นอาร์เรย์ ref ของอาร์เรย์ refs writestring () ถ้าไม่มีเงื่อนไขใด ๆ ก่อนหน้านี้ พารามิเตอร์รูปแบบเป็นตัวเลือก ควรเป็นอ็อบเจ็กต์รูปแบบที่ถูกต้องดู 34CELL FORMATTING34: วิธี write () จะไม่สนใจสตริงที่ว่างเปล่าหรือโทเค็น undef นอกจากจะจัดรูปแบบไว้ ดังนั้นคุณจึงไม่ต้องกังวลเกี่ยวกับการจัดการพิเศษสำหรับค่าว่างหรือ undef ในข้อมูลของคุณ ดูวิธี writeblank () ด้วย ปัญหาหนึ่งที่เกิดกับ write () คือบางครั้งข้อมูลดูเหมือนจะเป็นตัวเลข แต่คุณไม่ต้องการให้ถือว่าเป็นตัวเลข ตัวอย่างเช่นรหัสไปรษณีย์หรือหมายเลขประจำตัวมักจะเริ่มต้นด้วยศูนย์นำ ถ้าคุณเขียนข้อมูลนี้เป็นตัวเลขเลขศูนย์นำหน้าจะถูกตัดออก คุณสามารถเปลี่ยนลักษณะการทำงานเริ่มต้นนี้ได้โดยใช้วิธีการ keepleadingzeros () ในขณะที่พร็อพเพอร์ตี้นี้อยู่ในตำแหน่งที่จำนวนเต็มใด ๆ กับศูนย์ชั้นนำจะถือว่าเป็นสตริงและศูนย์จะถูกเก็บไว้ ดูหัวข้อ keepleadingzeros () สำหรับการสนทนาเต็มรูปแบบของปัญหานี้ นอกจากนี้คุณยังสามารถเพิ่มตัวจัดการข้อมูลของคุณเองเพื่อ write () method โดยใช้ addwritehandler () เมธอด write () ยังจะจัดการสตริง Unicode ในรูปแบบ UTF-8 วิธีเขียนย้อนกลับ: เขียนจำนวนเต็มหรือลอยลงในเซลล์ที่ระบุโดยแถวและคอลัมน์: ดูหมายเหตุเกี่ยวกับโน้ต 34Cell34 พารามิเตอร์รูปแบบเป็นตัวเลือก โดยทั่วไปจะเพียงพอที่จะใช้วิธี write () บันทึก . Excel 2007 บางรุ่นไม่แสดงค่าที่คำนวณได้ของสูตรที่เขียนโดย Excel :: Writer :: XLSX การใช้เซอร์วิสแพ็คที่มีอยู่ทั้งหมดใน Excel ควรแก้ไขปัญหานี้ เขียนสตริงไปยังเซลล์ที่ระบุโดยแถวและคอลัมน์: ขนาดสตริงสูงสุดคือ 32767 อักขระ อย่างไรก็ตามส่วนของสายอักขระสูงสุดที่ Excel สามารถแสดงในเซลล์เท่ากับ 1000 อักขระ 32767 ทั้งหมดสามารถแสดงผลได้ในแถบสูตร พารามิเตอร์รูปแบบเป็นตัวเลือก วิธี write () จะจัดการสตริงในรูปแบบ UTF-8 ดูที่โปรแกรม unicode. pl ในไดเร็กทอรีตัวอย่างของ distro โดยทั่วไปจะเพียงพอที่จะใช้วิธี write () อย่างไรก็ตามบางครั้งคุณอาจต้องการใช้วิธีเขียน writestring () เพื่อเขียนข้อมูลที่มีลักษณะเป็นตัวเลข แต่คุณไม่ต้องการให้ถือว่าเป็นตัวเลข ตัวอย่างเช่นรหัสไปรษณีย์หรือหมายเลขโทรศัพท์: อย่างไรก็ตามถ้าผู้ใช้แก้ไขบรรทัดนี้ Excel อาจแปลงกลับไปเป็นตัวเลข คุณสามารถใช้รูปแบบข้อความ Excel ได้: วิธี writerichstring () ใช้เพื่อเขียนสตริงที่มีหลายรูปแบบ ตัวอย่างเช่นการเขียนสตริง 34 นี่เป็นตัวหนาและนี่คือตัวเอียง 34 คุณจะใช้สิ่งต่อไปนี้กฎพื้นฐานคือการแบ่งสตริงเป็นเศษและวางอ็อบเจ็กต์รูปแบบไว้ก่อนส่วนที่คุณต้องการจัดรูปแบบ ตัวอย่างเช่น: เศษสตริงที่ไม่มีรูปแบบจะมีรูปแบบเริ่มต้น ตัวอย่างเช่นเมื่อเขียนสตริง 34Some bold text34 คุณจะใช้ตัวอย่างแรกด้านล่าง แต่จะเทียบเท่ากับสอง: เช่นเดียวกับ Excel เฉพาะคุณสมบัติแบบอักษรของรูปแบบเช่นชื่อแบบอักษรสไตล์ขนาดขีดเส้นใต้สีและ เอฟเฟ็กต์จะใช้กับเศษสตริง ต้องใช้คุณสมบัติอื่น ๆ เช่นเส้นขอบพื้นหลังการตัดข้อความและการจัดตำแหน่งให้กับเซลล์ กระบวนการ writerichstring () ช่วยให้คุณสามารถทำได้โดยใช้อาร์กิวเมนต์สุดท้ายเป็นรูปแบบเซลล์ (ถ้าเป็นอ็อบเจ็กต์รูปแบบ) ตัวอย่างต่อไปนี้กำหนดศูนย์สตริงที่อุดมไปด้วยในเซลล์: ดูตัวอย่าง richstrings. pl ใน distro เพื่อดูตัวอย่างเพิ่มเติม เช่นเดียวกับการเขียน () ขนาดสตริงสูงสุดคือ 32767 อักขระ ดูหมายเหตุเกี่ยวกับโน้ต 34Cell 34 วิธีนี้จะเปลี่ยนการจัดการค่าเริ่มต้นของจำนวนเต็มด้วยศูนย์นำหน้าเมื่อใช้วิธี write () วิธี write () ใช้นิพจน์ปกติเพื่อกำหนดชนิดของข้อมูลที่จะเขียนลงในแผ่นงาน Excel หากข้อมูลมีลักษณะเป็นตัวเลขจะเขียนตัวเลขโดยใช้เลขที่เอกสาร () ปัญหาหนึ่งเกี่ยวกับวิธีนี้คือบางครั้งข้อมูลจะมีลักษณะเป็นตัวเลข แต่คุณไม่ต้องการให้ถือว่าเป็นตัวเลข รหัสไปรษณีย์และหมายเลขประจำตัวเช่นมักจะเริ่มต้นด้วยศูนย์นำ ถ้าคุณเขียนข้อมูลนี้เป็นตัวเลขเลขศูนย์นำหน้าจะถูกตัดออก นี่เป็นลักษณะการทำงานเริ่มต้นเมื่อคุณป้อนข้อมูลด้วยตนเองใน Excel เพื่อให้ได้รอบนี้คุณสามารถใช้หนึ่งในสามตัวเลือก เขียนหมายเลขที่จัดรูปแบบเขียนตัวเลขเป็นสตริงหรือใช้วิธี keepleadingzeros () เพื่อเปลี่ยนลักษณะการทำงานเริ่มต้นของ write (): โค้ดข้างต้นจะสร้างแผ่นงานที่มีลักษณะดังนี้: ตัวอย่างอยู่ในด้านต่างๆของเซลล์ เนื่องจากข้อเท็จจริงที่ Excel แสดงสตริงที่มีเหตุผลด้านซ้ายและตัวเลขที่มีการให้เหตุผลที่ถูกต้องตามค่าเริ่มต้น คุณสามารถเปลี่ยนแปลงได้โดยใช้รูปแบบเพื่อปรับข้อมูลดูที่ 34CELL FORMATTING34 ควรสังเกตว่าถ้าผู้ใช้แก้ไขข้อมูลในตัวอย่าง A3 และ A4 สตริงจะเปลี่ยนกลับเป็นตัวเลข อีกครั้งเป็นพฤติกรรมเริ่มต้นของ Excel เพื่อหลีกเลี่ยงปัญหานี้คุณสามารถใช้รูปแบบข้อความ: คุณสมบัติ keepleadingzeros () ถูกปิดใช้งานโดยค่าเริ่มต้น วิธี keepleadingzeros () ใช้เวลา 0 หรือ 1 เป็นอาร์กิวเมนต์ ค่าดีฟอลต์คือ 1 ถ้าอาร์กิวเมนต์ไม่ได้ระบุไว้: โปรดดูที่เมธอด addwritehandler () เขียนเซลล์ว่างที่ระบุโดยแถวและคอลัมน์: วิธีนี้ใช้เพื่อเพิ่มการจัดรูปแบบไปยังเซลล์ที่ไม่มีสตริงหรือค่าตัวเลข Excel แตกต่างระหว่างเซลล์ 34Empty34 และเซลล์ 34Blank34 เซลล์ 34Empty34 เป็นเซลล์ที่ไม่มีข้อมูลขณะที่เซลล์ 34Blank34 เป็นเซลล์ที่ไม่มีข้อมูล แต่มีการจัดรูปแบบ Excel เก็บข้อมูล 34Blank34 เซลล์ แต่ไม่สนใจเซลล์ 34Empty34 เช่นถ้าคุณเขียนเซลล์ที่ว่างเปล่าโดยไม่มีการจัดรูปแบบจะไม่มีผล: ความจริงที่ไม่น่าสนใจดูเหมือนนี้หมายความว่าคุณสามารถเขียนอาร์เรย์ของข้อมูลโดยไม่ต้องมีการรักษาพิเศษสำหรับค่าสตริง undef หรือว่างเปล่า วิธี writerow () สามารถใช้ในการเขียนอาร์เรย์ข้อมูล 1D หรือ 2D ได้ในครั้งเดียว ซึ่งจะเป็นประโยชน์สำหรับการแปลงผลลัพธ์ของแบบสอบถามฐานข้อมูลลงในแผ่นงาน Excel คุณต้องส่งข้อมูลอ้างอิงไปยังอาร์เรย์ของข้อมูลแทนที่จะเป็นอาร์เรย์ เมธอด write () จะถูกเรียกใช้สำหรับแต่ละองค์ประกอบของข้อมูล ตัวอย่าง: หมายเหตุ: เพื่อความสะดวกในการ write () method จะทำงานในลักษณะเดียวกับ writer () ถ้าผ่านการอ้างอิงอาร์เรย์ ดังนั้นสองสายวิธีต่อไปนี้จะเทียบเท่า: เช่นเดียวกับวิธีการเขียนทั้งหมดพารามิเตอร์รูปแบบเป็นตัวเลือก ถ้ามีการระบุรูปแบบจะใช้กับองค์ประกอบทั้งหมดของอาร์เรย์ข้อมูล การอ้างอิงอาร์เรย์ภายในข้อมูลจะถือว่าเป็นคอลัมน์ ช่วยให้คุณสามารถเขียนอาร์เรย์ 2D ข้อมูลในครั้งเดียวได้ ตัวอย่างเช่น: จะสร้างแผ่นงานดังนี้: เมื่อต้องการเขียนข้อมูลในลำดับแถวคอลัมน์ให้ดูที่วิธีการ writecol () ด้านล่าง ค่า undef ใด ๆ ในข้อมูลจะถูกละเว้นเว้นแต่จะมีการใช้รูปแบบกับข้อมูลซึ่งในกรณีนี้จะมีการเขียนเซลล์ที่มีการจัดรูปแบบไว้ ในทั้งสองกรณีค่าแถวหรือคอลัมน์ที่เหมาะสมจะยังคงเพิ่มขึ้น เพื่อหาข้อมูลเพิ่มเติมเกี่ยวกับการอ้างอิงอาร์เรย์โปรดดู perlref และ perlreftut ในเอกสาร Perl หลัก หากต้องการข้อมูลเพิ่มเติมเกี่ยวกับอาร์เรย์ 2D หรือ 34 รายการในรายการ 34 อ้างอิงถึง perllol วิธี writerow () ส่งกลับข้อผิดพลาดแรกที่พบเมื่อเขียนองค์ประกอบของข้อมูลหรือศูนย์หากไม่มีข้อผิดพลาดเกิดขึ้น ดูค่าตอบแทนที่อธิบายไว้สำหรับ write () ข้างต้น ดูที่โปรแกรม writearrays. pl ในไดเร็กทอรีตัวอย่างของ distro วิธี writerow () ช่วยให้สามารถแปลงไฟล์ข้อความเป็นไฟล์ Excel ได้ดังต่อไปนี้: สามารถใช้เมธอด writecol () เพื่อเขียนอาร์เรย์ข้อมูล 1D หรือ 2D ได้ในครั้งเดียว ซึ่งจะเป็นประโยชน์สำหรับการแปลงผลลัพธ์ของแบบสอบถามฐานข้อมูลลงในแผ่นงาน Excel คุณต้องส่งข้อมูลอ้างอิงไปยังอาร์เรย์ของข้อมูลแทนที่จะเป็นอาร์เรย์ เมธอด write () จะถูกเรียกใช้สำหรับแต่ละองค์ประกอบของข้อมูล ตัวอย่างเช่นเช่นเดียวกับวิธีการเขียนทั้งหมดพารามิเตอร์รูปแบบจะไม่ใส่ก็ได้ ถ้ามีการระบุรูปแบบจะใช้กับองค์ประกอบทั้งหมดของอาร์เรย์ข้อมูล การอ้างอิงอาร์เรย์ภายในข้อมูลจะถือว่าเป็นแถว ช่วยให้คุณสามารถเขียนอาร์เรย์ 2D ข้อมูลในครั้งเดียวได้ ตัวอย่างเช่น: จะสร้างแผ่นงานดังนี้: ในการเขียนข้อมูลในลำดับคอลัมน์แถวให้ดูที่วิธี writerow () ด้านบน ค่า undef ใด ๆ ในข้อมูลจะถูกละเว้นเว้นแต่จะมีการใช้รูปแบบกับข้อมูลซึ่งในกรณีนี้จะมีการเขียนเซลล์ที่มีการจัดรูปแบบไว้ ในทั้งสองกรณีค่าแถวหรือคอลัมน์ที่เหมาะสมจะยังคงเพิ่มขึ้น ดังที่ระบุไว้ด้านบนวิธี write () สามารถใช้เป็นคำพ้องสำหรับ writerow () และ writerow () จัดการอาร์เรย์ที่ซ้อนกันเป็นคอลัมน์ ดังนั้นการเรียกใช้เมธอดสองวิธีต่อไปนี้มีค่าเท่ากันแม้ว่าจะมีการเรียกร้องชัดกว่าที่ writecol () เพื่อความสามารถในการดูแลรักษา: เพื่อหาข้อมูลเพิ่มเติมเกี่ยวกับการอ้างอิงอาร์เรย์โปรดดู perlref และ perlreftut ในเอกสาร Perl หลัก หากต้องการข้อมูลเพิ่มเติมเกี่ยวกับอาร์เรย์ 2D หรือ 34 รายการในรายการ 34 อ้างอิงถึง perllol เมธอด writecol () ส่งกลับข้อผิดพลาดแรกที่พบเมื่อเขียนองค์ประกอบของข้อมูลหรือศูนย์ถ้าไม่มีข้อผิดพลาด ดูค่าตอบแทนที่อธิบายไว้สำหรับ write () ข้างต้น ดูที่โปรแกรม writearrays. pl ในไดเร็กทอรีตัวอย่างของ distro คุณสามารถใช้เมธอด writedatetime () เพื่อเขียนวันที่หรือเวลาลงในเซลล์ที่ระบุโดยแถวและคอลัมน์: Datestring ควรอยู่ในรูปแบบต่อไปนี้: ข้อมูลนี้สอดคล้องกับวันที่ของ ISO8601 แต่ควรสังเกตด้วยว่ารูปแบบ ISO8601 แบบเต็มรูปแบบ ไม่ได้รับการสนับสนุน อนุญาตให้ใช้รูปแบบต่อไปนี้ในพารามิเตอร์ datestring: โปรดทราบว่า T จำเป็นต้องใช้ในทุกกรณี วันที่ควรมีรูปแบบเสมอ มิฉะนั้นจะปรากฏเป็นตัวเลขให้ดูที่ 34 วันและเวลาใน EXCEL34 และ 34CELL FORMATTING34 นี่เป็นตัวอย่างทั่วไป: วันที่ที่ถูกต้องควรอยู่ในช่วง 1900-01-01 ถึง 9999-12-31 สำหรับยุค 1900 และ 1904-01-01 ถึง 9999-12-31 สำหรับยุค 1904 เช่นเดียวกับ Excel วันที่อยู่นอกช่วงเหล่านี้จะถูกเขียนเป็นสตริง ดูที่โปรแกรม datetime. pl ในไดเร็กทอรีตัวอย่างของ distro เขียนไฮเปอร์ลิงก์ไปยัง URL ในเซลล์ที่ระบุโดยแถวและคอลัมน์ การเชื่อมโยงหลายมิติประกอบด้วยองค์ประกอบสองส่วนคือป้ายกำกับที่มองเห็นได้และลิงก์ที่มองไม่เห็น ป้ายกำกับที่เห็นได้จะเหมือนกับลิงค์ยกเว้นที่ระบุไว้ในฉลากอื่น พารามิเตอร์ป้ายชื่อเป็นตัวเลือก ฉลากเขียนโดยใช้วิธี write () ดังนั้นจึงเป็นไปได้ที่จะเขียนสตริงตัวเลขหรือสูตรเป็นป้ายกำกับ พารามิเตอร์รูปแบบเป็นตัวเลือกอย่างไรก็ตามไม่มีรูปแบบลิงก์จะมีลักษณะเป็นลิงก์ รูปแบบที่แนะนำคือ: หมายเหตุ ลักษณะการทำงานนี้แตกต่างจากสเปรดชีต :: WriteExcel ซึ่งมีรูปแบบการเชื่อมโยงหลายมิติเริ่มต้นหาก isn39t ระบุโดยผู้ใช้ มี URI ที่รองรับรูปแบบเว็บอยู่สี่รูปแบบ:. . ftp: และ mailto คุณสามารถแสดงสตริงอื่นโดยใช้พารามิเตอร์ label: ถ้าคุณต้องการมีข้อมูลเซลล์อื่น ๆ เช่นหมายเลขหรือสูตรคุณสามารถเขียนทับเซลล์โดยใช้สายเรียกเข้าอื่นเพื่อเขียน (): มี URI สองตัวที่สนับสนุนภายใน: internal: และ ภายนอก. ใช้สำหรับการเชื่อมโยงหลายมิติในการอ้างอิงเวิร์กชีตภายในหรือสมุดงานภายนอกและการอ้างอิงเวิร์กชีท: URI ทุกประเภทเหล่านี้ได้รับการจดจำโดยใช้วิธี write () ดูด้านบน การอ้างอิงแผ่นงานมักเป็นแบบฟอร์ม Sheet1A1 นอกจากนี้คุณสามารถดูช่วงของแผ่นงานได้โดยใช้สัญกรณ์ Excel มาตรฐาน: Sheet1A1: B2 ในลิงก์ภายนอกชื่อเวิร์กบุคและชื่อเวิร์กชีทจะต้องมีการคั่นด้วยอักขระ: external: Workbook. xlsxSheet1A139 นอกจากนี้คุณสามารถเชื่อมโยงไปยังช่วงที่ตั้งชื่อไว้ในแผ่นงานเป้าหมาย ตัวอย่างเช่นสมมติว่าคุณมีช่วงชื่อที่เรียกว่า myname ในสมุดงาน c: tempfoo. xlsx คุณสามารถเชื่อมโยงไปได้ดังนี้: Excel ต้องการให้ระบุชื่อเวิร์กชีทที่มีช่องว่างหรืออักขระที่เป็นตัวอักษรและตัวเลขที่ไม่ซ้ำกันดังต่อไปนี้ 39Sales Data39A1 ถ้าคุณต้องการทำเช่นนี้ในสตริงเดียวที่ยกมาแล้วคุณสามารถหลบหนีคำพูดเดียว 39 หรือใช้ใบเสนอราคา q ตามที่อธิบายไว้ใน perlop ในเอกสาร Perl หลัก ลิงค์ไปยังไฟล์เครือข่ายได้รับการสนับสนุน MSNovell Network files normally begin with two back slashes as follows NETWORKetc. In order to generate this in a single or double quoted string you will have to escape the backslashes, 39NETWORKetc39 . If you are using double quote strings then you should be careful to escape anything that looks like a metacharacter. For more information see perlfaq5: Why can39t I use 34C:tempfoo34 in DOS paths. Finally, you can avoid most of these quoting problems by using forward slashes. These are translated internally to backslashes: Note: Excel::Writer::XLSX will escape the following characters in URLs as required by Excel: s 34 60 62 unless the URL already contains xx style escapes. In which case it is assumed that the URL was escaped correctly by the user and will by passed directly to Excel. Excel limits hyperlink links and anchorlocations to 255 characters each. Write a formula or function to the cell specified by row and column : Array formulas are also supported: See also the writearrayformula() method below. If required, it is also possible to specify the calculated value of the formula. This is occasionally necessary when working with non-Excel applications that don39t calculate the value of the formula. The calculated value is added at the end of the argument list: However, this probably isn39t something that you will ever need to do. If you do use this feature then do so with care. Write an array formula to a cell range. In Excel an array formula is a formula that performs a calculation on a set of values. It can return a single value or a range of values. An array formula is indicated by a pair of braces around the formula: . If the array formula returns a single value then the first and last parameters should be the same: It this case however it is easier to just use the writeformula() or write() methods: For array formulas that return a range of values you must specify the range that the return values will be written to: If required, it is also possible to specify the calculated value of the formula. This is occasionally necessary when working with non-Excel applications that don39t calculate the value of the formula. However, using this parameter only writes a single value to the upper left cell in the result array. For a multi-cell array formula where the results are required, the other result values can be specified by using writenumber() to write to the appropriate cell: In addition, some early versions of Excel 2007 don39t calculate the values of array formulas when they aren39t supplied. Installing the latest Office Service Pack should fix this issue. See also the arrayformula. pl program in the examples directory of the distro. Note: Array formulas are not supported by Spreadsheet::WriteExcel. Write an Excel boolean value to the cell specified by row and column : A value that is true or false using Perl39s rules will be written as an Excel boolean TRUE or FALSE value. Deprecated. This is a Spreadsheet::WriteExcel method that is no longer required by Excel::Writer::XLSX. See below. Deprecated. This is a Spreadsheet::WriteExcel method that is no longer required by Excel::Writer::XLSX. In Spreadsheet::WriteExcel it was computationally expensive to write formulas since they were parsed by a recursive descent parser. The storeformula() and repeatformula() methods were used as a way of avoiding the overhead of repeated formulas by reusing a pre-parsed formula. In Excel::Writer::XLSX this is no longer necessary since it is just as quick to write a formula as it is to write a string or a number. The methods remain for backward compatibility but new Excel::Writer::XLSX programs shouldn39t use them. The writecomment() method is used to add a comment to a cell. A cell comment is indicated in Excel by a small red triangle in the upper right-hand corner of the cell. Moving the cursor over the red triangle will reveal the comment. The following example shows how to add a comment to a cell: As usual you can replace the row and column parameters with an A1 cell reference. See the note about 34Cell notation34 . The writecomment() method will also handle strings in UTF-8 format. In addition to the basic 3 argument form of writecomment() you can pass in several optional keyvalue pairs to control the format of the comment. For example: Most of these options are quite specific and in general the default comment behaves will be all that you need. However, should you need greater control over the format of the cell comment the following options are available: This option is used to indicate who is the author of the cell comment. Excel displays the author of the comment in the status bar at the bottom of the worksheet. This is usually of interest in corporate environments where several people might review and provide comments to a workbook. The default author for all cell comments can be set using the setcommentsauthor() method (see below). This option is used to make a cell comment visible when the worksheet is opened. The default behaviour in Excel is that comments are initially hidden. However, it is also possible in Excel to make individual or all comments visible. In Excel::Writer::XLSX individual comments can be made visible as follows: It is possible to make all comments in a worksheet visible using the showcomments() worksheet method (see below). Alternatively, if all of the cell comments have been made visible you can hide individual comments: This option is used to set the width of the cell comment box as a factor of the default width. This option is used to set the width of the cell comment box explicitly in pixels. This option is used to set the height of the cell comment box as a factor of the default height. This option is used to set the height of the cell comment box explicitly in pixels. This option is used to set the background colour of cell comment box. You can use one of the named colours recognised by Excel::Writer::XLSX or a Html style RRGGBB colour. See 34WORKING WITH COLOURS34 . This option is used to set the cell in which the comment will appear. By default Excel displays comments one cell to the right and one cell above the cell to which the comment relates. However, you can change this behaviour if you wish. In the following example the comment which would appear by default in cell D2 is moved to E2 . This option is used to set the row in which the comment will appear. See the startcell option above. The row is zero indexed. This option is used to set the column in which the comment will appear. See the startcell option above. The column is zero indexed. This option is used to change the x offset, in pixels, of a comment within a cell: This option is used to change the y offset, in pixels, of a comment within a cell: You can apply as many of these options as you require. Note about using options that adjust the position of the cell comment such as startcell, startrow, startcol, xoffset and yoffset . Excel only displays offset cell comments when they are displayed as 34visible34. Excel does not display hidden cells as moved when you mouse over them. Note about row height and comments . If you specify the height of a row that contains a comment then Excel::Writer::XLSX will adjust the height of the comment to maintain the default or user specified dimensions. However, the height of a row can also be adjusted automatically by Excel if the text wrap property is set or large fonts are used in the cell. This means that the height of the row is unknown to the module at run time and thus the comment box is stretched with the row. Use the setrow() method to specify the row height explicitly and avoid this problem. This method is used to make all cell comments visible when a worksheet is opened. Individual comments can be made visible using the visible parameter of the writecomment method (see above): If all of the cell comments have been made visible you can hide individual comments as follows: This method is used to set the default author of all cell comments. Individual comment authors can be set using the author parameter of the writecomment method (see above). The default comment author is an empty string, 3939. if no author is specified. This method is used to extend the Excel::Writer::XLSX write() method to handle user defined data. If you refer to the section on write() above you will see that it acts as an alias for several more specific write methods. However, it doesn39t always act in exactly the way that you would like it to. One solution is to filter the input data yourself and call the appropriate write method. Another approach is to use the addwritehandler() method to add your own automated behaviour to write() . The addwritehandler() method take two arguments, re. a regular expression to match incoming data and coderef a callback function to handle the matched data: (In the these examples the qr operator is used to quote the regular expression strings, see perlop for more details). The method is used as follows. say you wished to write 7 digit ID numbers as a string so that any leading zeros were preserved, you could do something like the following: You could also use the keepleadingzeros() method for this. Then if you call write() with an appropriate string it will be handled automatically: The callback function will receive a reference to the calling worksheet and all of the other arguments that were passed to write(). The callback will see an argument list that looks like the following: Your callback should return() the return value of the write method that was called or undef to indicate that you rejected the match and want write() to continue as normal. So for example if you wished to apply the previous filter only to ID values that occur in the first column you could modify your callback function as follows: Now, you will get different behaviour for the first column and other columns: You may add more than one handler in which case they will be called in the order that they were added. Note, the addwritehandler() method is particularly suited for handling dates. See the writehandler 1-4 programs in the examples directory for further examples. This method can be used to insert a image into a worksheet. The image can be in PNG, JPEG or BMP format. The x. y. xscale and yscale parameters are optional. The parameters x and y can be used to specify an offset from the top left hand corner of the cell specified by row and col. The offset values are in pixels. The offsets can be greater than the width or height of the underlying cell. This can be occasionally useful if you wish to align two or more images relative to the same cell. The parameters xscale and yscale can be used to scale the inserted image horizontally and vertically: Note: you must call setrow() or setcolumn() before insertimage() if you wish to change the default dimensions of any of the rows or columns that the image occupies. The height of a row can also change if you use a font that is larger than the default. This in turn will affect the scaling of your image. To avoid this you should explicitly set the height of the row using setrow() if it contains a font size that will change the row height. BMP images must be 24 bit, true colour, bitmaps. In general it is best to avoid BMP images since they aren39t compressed. This method can be used to insert a Chart object into a worksheet. The Chart must be created by the addchart() Workbook method and it must have the embedded option set. See addchart() for details on how to create the Chart object and Excel::Writer::XLSX::Chart for details on how to configure it. See also the chart. pl programs in the examples directory of the distro. The x. y. xscale and yscale parameters are optional. The parameters x and y can be used to specify an offset from the top left hand corner of the cell specified by row and col. The offset values are in pixels. The parameters xscale and yscale can be used to scale the inserted chart horizontally and vertically: This method can be used to insert a Shape object into a worksheet. The Shape must be created by the addshape() Workbook method. See addshape() for details on how to create the Shape object and Excel::Writer::XLSX::Shape for details on how to configure it. The x. y. xscale and yscale parameters are optional. The parameters x and y can be used to specify an offset from the top left hand corner of the cell specified by row and col. The offset values are in pixels. The parameters xscale and yscale can be used to scale the inserted shape horizontally and vertically: See also the shape. pl programs in the examples directory of the distro. insertbutton( row, col, ) The insertbutton() method can be used to insert an Excel form button into a worksheet. This method is generally only useful when used in conjunction with the Workbook addvbaproject() method to tie the button to a macro from an embedded VBA project: The properties of the button that can be set are: This option is used to set the macro that the button will invoke when the user clicks on it. The macro should be included using the Workbook addvbaproject() method shown above. The default macro is ButtonXClick where X is the button number. This option is used to set the caption on the button. The default is Button X where X is the button number. This option is used to set the width of the button in pixels. The default button width is 64 pixels which is the width of a default cell. This option is used to set the height of the button in pixels. The default button height is 20 pixels which is the height of a default cell. This option is used to set the width of the button as a factor of the default width. This option is used to set the height of the button as a factor of the default height. This option is used to change the x offset, in pixels, of a button within a cell: This option is used to change the y offset, in pixels, of a comment within a cell. Note: Button is the only Excel form element that is available in Excel::Writer::XLSX. Form elements represent a lot of work to implement and the underlying VML syntax isn39t very much fun. The datavalidation() method is used to construct an Excel data validation or to limit the user input to a dropdown list of values. This method contains a lot of parameters and is described in detail in a separate section 34DATA VALIDATION IN EXCEL34 . See also the datavalidate. pl program in the examples directory of the distro The conditionalformatting() method is used to add formatting to a cell or range of cells based on user defined criteria. This method contains a lot of parameters and is described in detail in a separate section 34CONDITIONAL FORMATTING IN EXCEL34 . See also the conditionalformat. pl program in the examples directory of the distro The addsparkline() worksheet method is used to add sparklines to a cell or a range of cells. This method contains a lot of parameters and is described in detail in a separate section 34SPARKLINES IN EXCEL34 . See also the sparklines1.pl and sparklines2.pl example programs in the examples directory of the distro. Note: Sparklines are a feature of Excel 2010 only. You can write them to an XLSX file that can be read by Excel 2007 but they won39t be displayed. The addtable() method is used to group a range of cells into an Excel Table. This method contains a lot of parameters and is described in detail in a separate section 34TABLES IN EXCEL34 . See also the tables. pl program in the examples directory of the distro The getname() method is used to retrieve the name of a worksheet. For example: For reasons related to the design of Excel::Writer::XLSX and to the internals of Excel there is no setname() method. The only way to set the worksheet name is via the addworksheet() method. The activate() method is used to specify which worksheet is initially visible in a multi-sheet workbook: This is similar to the Excel VBA activate method. More than one worksheet can be selected via the select() method, see below, however only one worksheet can be active. The default active worksheet is the first worksheet. The select() method is used to indicate that a worksheet is selected in a multi-sheet workbook: A selected worksheet has its tab highlighted. Selecting worksheets is a way of grouping them together so that, for example, several worksheets could be printed in one go. A worksheet that has been activated via the activate() method will also appear as selected. The hide() method is used to hide a worksheet: You may wish to hide a worksheet in order to avoid confusing a user with intermediate data or calculations. A hidden worksheet can not be activated or selected so this method is mutually exclusive with the activate() and select() methods. In addition, since the first worksheet will default to being the active worksheet, you cannot hide the first worksheet without activating another sheet: The activate() method determines which worksheet is initially selected. However, if there are a large number of worksheets the selected worksheet may not appear on the screen. To avoid this you can select which is the leftmost visible worksheet using setfirstsheet() : This method is not required very often. The default value is the first worksheet. The protect() method is used to protect a worksheet from modification: The protect() method also has the effect of enabling a cell39s locked and hidden properties if they have been set. A locked cell cannot be edited and this property is on by default for all cells. A hidden cell will display the results of a formula but not the formula itself. See the protection. pl program in the examples directory of the distro for an illustrative example and the setlocked and sethidden format methods in 34CELL FORMATTING34 . You can optionally add a password to the worksheet protection: Passing the empty string 3939 is the same as turning on protection without a password. Note, the worksheet level password in Excel provides very weak protection. It does not encrypt your data and is very easy to deactivate. Full workbook encryption is not supported by Excel::Writer::XLSX since it requires a completely different file format and would take several man months to implement. You can specify which worksheet elements you wish to protect by passing a hashref with any or all of the following keys: The default boolean values are shown above. Individual elements can be protected as follows: This method can be used to specify which cell or cells are selected in a worksheet. The most common requirement is to select a single cell, in which case lastrow and lastcol can be omitted. The active cell within a selected range is determined by the order in which first and last are specified. It is also possible to specify a cell or a range using A1 notation. See the note about 34Cell notation34 . The default cell selections is (0, 0), 39A139. This method can be used to change the default properties of a row. All parameters apart from row are optional. The most common use for this method is to change the height of a row: If you wish to set the format without changing the height you can pass undef as the height parameter: The format parameter will be applied to any cells in the row that don39t have a format. For example If you wish to define a row format in this way you should call the method before any calls to write(). Calling it afterwards will overwrite any format that was previously specified. The hidden parameter should be set to 1 if you wish to hide a row. This can be used, for example, to hide intermediary steps in a complicated calculation: The level parameter is used to set the outline level of the row. Outlines are described in 34OUTLINES AND GROUPING IN EXCEL34. Adjacent rows with the same outline level are grouped together into a single outline. The following example sets an outline level of 1 for rows 1 and 2 (zero-indexed): The hidden parameter can also be used to hide collapsed outlined rows when used in conjunction with the level parameter. For collapsed outlines you should also indicate which row has the collapsed symbol using the optional collapsed parameter. For a more complete example see the outline. pl and outlinecollapsed. pl programs in the examples directory of the distro. Excel allows up to 7 outline levels. Therefore the level parameter should be in the range 0 60 level 60 7 . This method can be used to change the default properties of a single column or a range of columns. All parameters apart from firstcol and lastcol are optional. If setcolumn() is applied to a single column the value of firstcol and lastcol should be the same. In the case where lastcol is zero it is set to the same value as firstcol . It is also possible, and generally clearer, to specify a column range using the form of A1 notation used for columns. See the note about 34Cell notation34 . The width corresponds to the column width value that is specified in Excel. It is approximately equal to the length of a string in the default font of Calibri 11. Unfortunately, there is no way to specify 34AutoFit34 for a column in the Excel file format. This feature is only available at runtime from within Excel. As usual the format parameter is optional, for additional information, see 34CELL FORMATTING34. If you wish to set the format without changing the width you can pass undef as the width parameter: The format parameter will be applied to any cells in the column that don39t have a format. For example If you wish to define a column format in this way you should call the method before any calls to write(). If you call it afterwards it won39t have any effect. A default row format takes precedence over a default column format The hidden parameter should be set to 1 if you wish to hide a column. This can be used, for example, to hide intermediary steps in a complicated calculation: The level parameter is used to set the outline level of the column. Outlines are described in 34OUTLINES AND GROUPING IN EXCEL34. Adjacent columns with the same outline level are grouped together into a single outline. The following example sets an outline level of 1 for columns B to G: The hidden parameter can also be used to hide collapsed outlined columns when used in conjunction with the level parameter. For collapsed outlines you should also indicate which row has the collapsed symbol using the optional collapsed parameter. For a more complete example see the outline. pl and outlinecollapsed. pl programs in the examples directory of the distro. Excel allows up to 7 outline levels. Therefore the level parameter should be in the range 0 60 level 60 7 . The setdefaultrow() method is used to set the limited number of default row properties allowed by Excel. These are the default height and the option to hide unused rows. The option to hide unused rows is used by Excel as an optimisation so that the user can hide a large number of rows without generating a very large file with an entry for each hidden row. See the hiderowcol. pl example program. The outlinesettings() method is used to control the appearance of outlines in Excel. Outlines are described in 34OUTLINES AND GROUPING IN EXCEL34 . The visible parameter is used to control whether or not outlines are visible. Setting this parameter to 0 will cause all outlines on the worksheet to be hidden. They can be unhidden in Excel by means of the 34Show Outline Symbols34 command button. The default setting is 1 for visible outlines. The symbolsbelow parameter is used to control whether the row outline symbol will appear above or below the outline level bar. The default setting is 1 for symbols to appear below the outline level bar. The symbolsright parameter is used to control whether the column outline symbol will appear to the left or the right of the outline level bar. The default setting is 1 for symbols to appear to the right of the outline level bar. The autostyle parameter is used to control whether the automatic outline generator in Excel uses automatic styles when creating an outline. This has no effect on a file generated by Excel::Writer::XLSX but it does have an effect on how the worksheet behaves after it is created. The default setting is 0 for 34Automatic Styles34 to be turned off. The default settings for all of these parameters correspond to Excel39s default parameters. The worksheet parameters controlled by outlinesettings() are rarely used. This method can be used to divide a worksheet into horizontal or vertical regions known as panes and to also 34freeze34 these panes so that the splitter bars are not visible. This is the same as the Window-62Freeze Panes menu command in Excel The parameters row and col are used to specify the location of the split. It should be noted that the split is specified at the top or left of a cell and that the method uses zero based indexing. Therefore to freeze the first row of a worksheet it is necessary to specify the split at row 2 (which is 1 as the zero-based index). This might lead you to think that you are using a 1 based index but this is not the case. You can set one of the row and col parameters as zero if you do not want either a vertical or horizontal split. The parameters toprow and leftcol are optional. They are used to specify the top-most or left-most visible row or column in the scrolling region of the panes. For example to freeze the first row and to have the scrolling region begin at row twenty: You cannot use A1 notation for the toprow and leftcol parameters. See also the panes. pl program in the examples directory of the distribution. This method can be used to divide a worksheet into horizontal or vertical regions known as panes. This method is different from the freezepanes() method in that the splits between the panes will be visible to the user and each pane will have its own scroll bars. The parameters y and x are used to specify the vertical and horizontal position of the split. The units for y and x are the same as those used by Excel to specify row height and column width. However, the vertical and horizontal units are different from each other. Therefore you must specify the y and x parameters in terms of the row heights and column widths that you have set or the default values which are 15 for a row and 8.43 for a column. You can set one of the y and x parameters as zero if you do not want either a vertical or horizontal split. The parameters toprow and leftcol are optional. They are used to specify the top-most or left-most visible row or column in the bottom-right pane. You cannot use A1 notation with this method. See also the freezepanes() method and the panes. pl program in the examples directory of the distribution. The mergerange() method allows you to merge cells that contain other types of alignment in addition to the merging: mergerange() writes its token argument using the worksheet write() method. Therefore it will handle numbers, strings, formulas or urls as required. If you need to specify the required write() method use the mergerangetype() method, see below. The full possibilities of this method are shown in the merge3.pl to merge6.pl programs in the examples directory of the distribution. The mergerange() method, see above, uses write() to insert the required data into to a merged range. However, there may be times where this isn39t what you require so as an alternative the mergerangetype () method allows you to specify the type of data you wish to write. For example: The type must be one of the following, which corresponds to a write() method: Any arguments after the range should be whatever the appropriate method accepts: Note, you must always pass a format object as an argument, even if it is a default format. Set the worksheet zoom factor in the range 10 60 scale 60 400 : The default zoom factor is 100. You cannot zoom to 34Selection34 because it is calculated by Excel at run-time. Note, setzoom() does not affect the scale of the printed page. For that you should use setprintscale() . The righttoleft() method is used to change the default direction of the worksheet from left-to-right, with the A1 cell in the top left, to right-to-left, with the A1 cell in the top right. This is useful when creating Arabic, Hebrew or other near or far eastern worksheets that use right-to-left as the default direction. The hidezero() method is used to hide any zero values that appear in cells. In Excel this option is found under Tools-62Options-62View. The settabcolor() method is used to change the colour of the worksheet tab. You can use one of the standard colour names provided by the Format object or a Html style RRGGBB colour. See 34WORKING WITH COLOURS34 . See the tabcolors. pl program in the examples directory of the distro. This method allows an autofilter to be added to a worksheet. An autofilter is a way of adding drop down lists to the headers of a 2D range of worksheet data. This allows users to filter the data based on simple criteria so that some data is shown and some is hidden. To add an autofilter to a worksheet: Filter conditions can be applied using the filtercolumn() or filtercolumnlist() method. See the autofilter. pl program in the examples directory of the distro for a more detailed example. The filtercolumn method can be used to filter columns in a autofilter range based on simple conditions. NOTE: It isn39t sufficient to just specify the filter condition. You must also hide any rows that don39t match the filter condition. Rows are hidden using the setrow() visible parameter. Excel::Writer::XLSX cannot do this automatically since it isn39t part of the file format. See the autofilter. pl program in the examples directory of the distro for an example. The conditions for the filter are specified using simple expressions: The column parameter can either be a zero indexed column number or a string column name. The following operators are available: The operator synonyms are just syntactic sugar to make you more comfortable using the expressions. It is important to remember that the expressions will be interpreted by Excel and not by perl. An expression can comprise a single statement or two statements separated by the and and or operators. For example: Filtering of blank or non-blank data can be achieved by using a value of Blanks or NonBlanks in the expression: Excel also allows some simple string matching operations: You can also use to match any character or number and. to match any single character or number. No other regular expression quantifier is supported by Excel39s filters. Excel39s regular expression characters can be escaped using The placeholder variable x in the above examples can be replaced by any simple string. The actual placeholder name is ignored internally so the following are all equivalent: Also, note that a filter condition can only be applied to a column in a range specified by the autofilter() Worksheet method. See the autofilter. pl program in the examples directory of the distro for a more detailed example. Note Spreadsheet::WriteExcel supports Top 10 style filters. These aren39t currently supported by Excel::Writer::XLSX but may be added later. Prior to Excel 2007 it was only possible to have either 1 or 2 filter conditions such as the ones shown above in the filtercolumn method. Excel 2007 introduced a new list style filter where it is possible to specify 1 or more 39or39 style criteria. For example if your column contained data for the first six months the initial data would be displayed as all selected as shown on the left. Then if you selected 39March39, 39April39 and 39May39 they would be displayed as shown on the right. The filtercolumnlist() method can be used to represent these types of filters: The column parameter can either be a zero indexed column number or a string column name. One or more criteria can be selected: NOTE: It isn39t sufficient to just specify the filter condition. You must also hide any rows that don39t match the filter condition. Rows are hidden using the setrow() visible parameter. Excel::Writer::XLSX cannot do this automatically since it isn39t part of the file format. See the autofilter. pl program in the examples directory of the distro for an example. The convertdatetime() method is used internally by the writedatetime() method to convert date strings to a number that represents an Excel date and time. It is exposed as a public method for utility purposes. The datestring format is detailed in the writedatetime() method. The Worksheet setvbaname() method can be used to set the VBA codename for the worksheet (there is a similar method for the workbook VBA name). This is sometimes required when a vbaProject macro included via addvbaproject() refers to the worksheet. The default Excel VBA name of Sheet1. etc. is used if a user defined name isn39t specified. Page set-up methods affect the way that a worksheet looks when it is printed. They control features such as page headers and footers and margins. These methods are really just standard worksheet methods. They are documented here in a separate section for the sake of clarity. The following methods are available for page set-up: A common requirement when working with Excel::Writer::XLSX is to apply the same page set-up features to all of the worksheets in a workbook. To do this you can use the sheets() method of the workbook class to access the array of worksheets in a workbook: This method is used to set the orientation of a worksheet39s printed page to landscape: This method is used to set the orientation of a worksheet39s printed page to portrait. The default worksheet orientation is portrait, so you won39t generally need to call this method. This method is used to display the worksheet in 34Page ViewLayout34 mode. This method is used to set the paper format for the printed output of a worksheet. The following paper styles are available: Note, it is likely that not all of these paper types will be available to the end user since it will depend on the paper formats that the user39s printer supports. Therefore, it is best to stick to standard paper types. If you do not specify a paper type the worksheet will print using the printer39s default paper. Center the worksheet data horizontally between the margins on the printed page: Center the worksheet data vertically between the margins on the printed page: There are several methods available for setting the worksheet margins on the printed page: All of these methods take a distance in inches as a parameter. Note: 1 inch 25.4mm. -) The default left and right margin is 0.7 inch. The default top and bottom margin is 0.75 inch. Note, these defaults are different from the defaults used in the binary file format by Spreadsheet::WriteExcel. Headers and footers are generated using a string which is a combination of plain text and control characters. The margin parameter is optional. The available control character are: Text in headers and footers can be justified (aligned) to the left, center and right by prefixing the text with the control characters 38L. 38C and 38R . For example (with ASCII art representation of the results): For simple text, if you do not specify any justification the text will be centred. However, you must prefix the text with 38C if you specify a font name or any other formatting: You can have text in each of the justification regions: The information control characters act as variables that Excel will update as the workbook or worksheet changes. Times and dates are in the users default format: Images can be inserted using the options shown below. Each image must have a placeholder in header string using the 38Picture or 38G control characters: You can specify the font size of a section of the text by prefixing it with the control character 38n where n is the font size: You can specify the font of a section of the text by prefixing it with the control sequence 3834font, style34 where fontname is a font name such as 34Courier New34 or 34Times New Roman34 and style is one of the standard Windows font descriptions: 34Regular34, 34Italic34, 34Bold34 or 34Bold Italic34: It is possible to combine all of these features together to create sophisticated headers and footers. As an aid to setting up complicated headers and footers you can record a page set-up as a macro in Excel and look at the format strings that VBA produces. Remember however that VBA uses two double quotes 3434 to indicate a single double quote. For the last example above the equivalent VBA code looks like this: To include a single literal ampersand 38 in a header or footer you should use a double ampersand 3838 : As stated above the margin parameter is optional. As with the other margins the value should be in inches. The default header and footer margin is 0.3 inch. Note, the default margin is different from the default used in the binary file format by Spreadsheet::WriteExcel. The header and footer margin size can be set as follows: The header and footer margins are independent of the top and bottom margins. The available options are: imageleft The path to the image. Requires a 38G or 38Picture placeholder. imagecenter Same as above. imageright Same as above. scalewithdoc Scale header with document. Defaults to true. alignwithmargins Align header to margins. Defaults to true. The image options must have an accompanying 38Picture or 38G control character in the header string: Note, the header or footer string must be less than 255 characters. Strings longer than this will not be written and a warning will be generated. The setheader() method can also handle Unicode strings in UTF-8 format. See, also the headers. pl program in the examples directory of the distribution. The syntax of the setfooter() method is the same as setheader(). see above. Set the number of rows to repeat at the top of each printed page. For large Excel documents it is often desirable to have the first row or rows of the worksheet print out at the top of each page. This can be achieved by using the repeatrows() method. The parameters firstrow and lastrow are zero based. The lastrow parameter is optional if you only wish to specify one row: Set the columns to repeat at the left hand side of each printed page. For large Excel documents it is often desirable to have the first column or columns of the worksheet print out at the left hand side of each page. This can be achieved by using the repeatcolumns() method. The parameters firstcolumn and lastcolumn are zero based. The lastcolumn parameter is optional if you only wish to specify one column. You can also specify the columns using A1 column notation, see the note about 34Cell notation34 . This method is used to hide the gridlines on the screen and printed page. Gridlines are the lines that divide the cells on a worksheet. Screen and printed gridlines are turned on by default in an Excel worksheet. If you have defined your own cell borders you may wish to hide the default gridlines. The following values of option are valid: If you don39t supply an argument or use undef the default option is 1, i. e. only the printed gridlines are hidden. Set the option to print the row and column headers on the printed page. An Excel worksheet looks something like the following The headers are the letters and numbers at the top and the left of the worksheet. Since these headers serve mainly as a indication of position on the worksheet they generally do not appear on the printed page. If you wish to have them printed you can use the printrowcolheaders() method : Do not confuse these headers with page headers as described in the setheader() section above. This method is used to specify the area of the worksheet that will be printed. All four parameters must be specified. You can also use A1 notation, see the note about 34Cell notation34 . The printacross method is used to change the default print direction. This is referred to by Excel as the sheet 34page order34. The default page order is shown below for a worksheet that extends over 4 pages. The order is called 34down then across34: However, by using the printacross method the print order will be changed to 34across then down34: The fittopages() method is used to fit the printed area to a specific number of pages both vertically and horizontally. If the printed area exceeds the specified number of pages it will be scaled down to fit. This guarantees that the printed area will always appear on the specified number of pages even if the page size or margins change. The print area can be defined using the printarea() method as described above. A common requirement is to fit the printed output to n pages wide but have the height be as long as necessary. To achieve this set the height to zero: Note that although it is valid to use both fittopages() and setprintscale() on the same worksheet only one of these options can be active at a time. The last method call made will set the active option. Note that fittopages() will override any manual page breaks that are defined in the worksheet. Note: When using fittopages() it may also be required to set the printer paper size using setpaper() or else Excel will default to 34US Letter34. The setstartpage() method is used to set the number of the starting page when the worksheet is printed out. The default value is 1. Set the scale factor of the printed page. Scale factors in the range 10 60 scale 60 400 are valid: The default scale factor is 100. Note, setprintscale() does not affect the scale of the visible page in Excel. For that you should use setzoom() . Note also that although it is valid to use both fittopages() and setprintscale() on the same worksheet only one of these options can be active at a time. The last method call made will set the active option. Set the option to print the worksheet in black and white: Add horizontal page breaks to a worksheet. A page break causes all the data that follows it to be printed on the next page. Horizontal page breaks act between rows. To create a page break between rows 20 and 21 you must specify the break at row 21. However in zero index notation this is actually row 20. So you can pretend for a small while that you are using 1 index notation: The sethpagebreaks() method will accept a list of page breaks and you can call it more than once: Note: If you specify the 34fit to page34 option via the fittopages() method it will override all manual page breaks. There is a silent limitation of about 1000 horizontal page breaks per worksheet in line with an Excel internal limitation. Add vertical page breaks to a worksheet. A page break causes all the data that follows it to be printed on the next page. Vertical page breaks act between columns. To create a page break between columns 20 and 21 you must specify the break at column 21. However in zero index notation this is actually column 20. So you can pretend for a small while that you are using 1 index notation: The setvpagebreaks() method will accept a list of page breaks and you can call it more than once: Note: If you specify the 34fit to page34 option via the fittopages() method it will override all manual page breaks. This section describes the methods and properties that are available for formatting cells in Excel. The properties of a cell that can be formatted include: fonts, colours, patterns, borders, alignment and number formatting. Cell formatting is defined through a Format object. Format objects are created by calling the workbook addformat() method as follows: The format object holds all the formatting properties that can be applied to a cell, a row or a column. The process of setting these properties is discussed in the next section. Once a Format object has been constructed and its properties have been set it can be passed as an argument to the worksheet write methods as follows: Formats can also be passed to the worksheet setrow() and setcolumn() methods to define the default property for a row or column. The following table shows the Excel format categories, the formatting properties that can be applied and the equivalent object method: There are two ways of setting Format properties: by using the object method interface or by setting the property directly. For example, a typical use of the method interface would be as follows: By comparison the properties can be set directly by passing a hash of properties to the Format constructor: or after the Format has been constructed by means of the setformatproperties() method as follows: You can also store the properties in one or more named hashes and pass them to the required method: The provision of two ways of setting properties might lead you to wonder which is the best way. The method mechanism may be better if you prefer setting properties via method calls (which the author did when the code was first written) otherwise passing properties to the constructor has proved to be a little more flexible and self documenting in practice. An additional advantage of working with property hashes is that it allows you to share formatting between workbook objects as shown in the example above. The PerlTk style of adding properties is also supported: The default format is Calibri 11 with all other properties off. Each unique format in Excel::Writer::XLSX must have a corresponding Format object. It isn39t possible to use a Format with a write() method and then redefine the Format for use at a later stage. This is because a Format is applied to a cell not in its current state but in its final state. Consider the following example: Cell A1 is assigned the Format format which is initially set to the colour red. However, the colour is subsequently set to green. When Excel displays Cell A1 it will display the final state of the Format which in this case will be the colour green. In general a method call without an argument will turn a property on, for example: The Format object methods are described in more detail in the following sections. In addition, there is a Perl program called formats. pl in the examples directory of the WriteExcel distribution. This program creates an Excel workbook called formats. xlsx which contains examples of almost all the format types. The following Format methods are available: The above methods can also be applied directly as properties. For example format-62setbold() is equivalent to workbook-62addformat(bold 62 1) . The properties of an existing Format object can be also be set by means of setformatproperties() : However, this method is here mainly for legacy reasons. It is preferable to set the properties in the format constructor: Specify the font used: Excel can only display fonts that are installed on the system that it is running on. Therefore it is best to use the fonts that come as standard such as 39Calibri39, 39Times New Roman39 and 39Courier New39. See also the Fonts worksheet created by formats. pl Set the font size. Excel adjusts the height of a row to accommodate the largest font size in the row. You can also explicitly specify the height of a row using the setrow() worksheet method. Set the font colour. The setcolor() method is used as follows: Note: The setcolor() method is used to set the colour of the font in a cell. To set the colour of a cell use the setbgcolor() and setpattern() methods. For additional examples see the 39Named colors39 and 39Standard colors39 worksheets created by formats. pl in the examples directory. Set the bold property of the font: Set the italic property of the font: This method is used to define the numerical format of a number in Excel. It controls whether a number is displayed as an integer, a floating point number, a date, a currency value or some other user defined format. The numerical format of a cell can be specified by using a format string or an index to one of Excel39s built-in formats: Using format strings you can define very sophisticated formatting of numbers. The number system used for dates is described in 34DATES AND TIME IN EXCEL34 . The colour format should have one of the following values: Alternatively you can specify the colour based on a colour index as follows: Color n. where n is a standard Excel colour index - 7. See the 39Standard colors39 worksheet created by formats. pl. For more information refer to the documentation on formatting in the docs directory of the Excel::Writer::XLSX distro, the Excel on-line help or office. microsoften-gbassistanceHP051995001033.aspx . You should ensure that the format string is valid in Excel prior to using it in WriteExcel. Excel39s built-in formats are shown in the following table: For examples of these formatting codes see the 39Numerical formats39 worksheet created by formats. pl. See also the numberformats1.html and the numberformats2.html documents in the docs directory of the distro. Note 1. Numeric formats 23 to 36 are not documented by Microsoft and may differ in international versions. Note 2. The dollar sign appears as the defined local currency symbol. This property can be used to prevent modification of a cells contents. Following Excel39s convention, cell locking is turned on by default. However, it only has an effect if the worksheet has been protected, see the worksheet protect() method. Note: This offers weak protection even with a password, see the note in relation to the protect() method. This property is used to hide a formula while still displaying its result. This is generally used to hide complex calculations from end users who are only interested in the result. It only has an effect if the worksheet has been protected, see the worksheet protect() method. Note: This offers weak protection even with a password, see the note in relation to the protect() method. This method is used to set the horizontal and vertical text alignment within a cell. Vertical and horizontal alignments can be combined. The method is used as follows: Text can be aligned across two or more adjacent cells using the centeracross property. However, for genuine merged cells it is better to use the mergerange() worksheet method. The vjustify (vertical justify) option can be used to provide automatic text wrapping in a cell. The height of the cell will be adjusted to accommodate the wrapped text. To specify where the text wraps use the settextwrap() method. For further examples see the 39Alignment39 worksheet created by formats. pl. Text can be aligned across two or more adjacent cells using the setcenteracross() method. This is an alias for the setalign(39centeracross39) method call. Only one cell should contain the text, the other cells should be blank: See also the merge1.pl to merge6.pl programs in the examples directory and the mergerange() method. Here is an example using the text wrap property, the escape character n is used to indicate the end of line: Excel will adjust the height of the row to accommodate the wrapped text. A similar effect can be obtained without newlines using the setalign(39vjustify39) method. See the textwrap. pl program in the examples directory. Set the rotation of the text in a cell. The rotation can be any angle in the range -90 to 90 degrees. The angle 270 is also supported. This indicates text where the letters run from top to bottom. This method can be used to indent text. The argument, which should be an integer, is taken as the level of indentation: Indentation is a horizontal alignment property. It will override any other horizontal properties but it can be used in conjunction with vertical properties. This method can be used to shrink text so that it fits in a cell. Only applies to Far Eastern versions of Excel. Set the background pattern of a cell. Examples of the available patterns are shown in the 39Patterns39 worksheet created by formats. pl. However, it is unlikely that you will ever need anything other than Pattern 1 which is a solid fill of the background color. The setbgcolor() method can be used to set the background colour of a pattern. Patterns are defined via the setpattern() method. If a pattern hasn39t been defined then a solid fill pattern is used as the default. Here is an example of how to set up a solid fill in a cell: For further examples see the 39Patterns39 worksheet created by formats. pl. The setfgcolor() method can be used to set the foreground colour of a pattern. For further examples see the 39Patterns39 worksheet created by formats. pl. A cell border is comprised of a border on the bottom, top, left and right. These can be set to the same value using setborder() or individually using the relevant method calls shown above. The following shows the border styles sorted by Excel::Writer::XLSX index number: The following shows the borders sorted by style: The following shows the borders in the order shown in the Excel Dialog. Examples of the available border styles are shown in the 39Borders39 worksheet created by formats. pl. Set the colour of the cell borders. A cell border is comprised of a border on the bottom, top, left and right. These can be set to the same colour using setbordercolor() or individually using the relevant method calls shown above. Examples of the border styles and colours are shown in the 39Borders39 worksheet created by formats. pl. Set the diagonal border type for the cell. Three types of diagonal borders are available in Excel: Set the diagonal border style. Same as the parameter to setborder() above. Set the colour of the diagonal cell border: This method is used to copy all of the properties from one Format object to another: The copy() method is only useful if you are using the method interface to Format properties. It generally isn39t required if you are setting Format properties directly using hashes. Note: this is not a copy constructor, both objects must exist prior to copying. The following is a brief introduction to handling Unicode in Excel::Writer::XLSX . For a more general introduction to Unicode handling in Perl see perlunitut and perluniintro . Excel::Writer::XLSX writer differs from Spreadsheet::WriteExcel in that it only handles Unicode data in UTF-8 format and doesn39t try to handle legacy UTF-16 Excel formats. If the data is in UTF-8 format then Excel::Writer::XLSX will handle it automatically. If you are dealing with non-ASCII characters that aren39t in UTF-8 then perl provides useful tools in the guise of the Encode module to help you to convert to the required format. For example: Alternatively you can read data from an encoded file and convert it to UTF-8 as you read it in: If the program contains UTF-8 text then you will also need to add use utf8 to the includes: See also the unicode. pl programs in the examples directory of the distro. Throughout Excel::Writer::XLSX colours can be specified using a Html style RRGGBB value. For example with a Format object: For backward compatibility a limited number of color names are supported: The color names supported are: See also colors. pl in the examples directory. There are two important things to understand about dates and times in Excel: These two points are explained in more detail below along with some suggestions on how to convert times and dates to the required format. If you write a date string with write() then all you will get is a string: Dates and times in Excel are represented by real numbers, for example 34Jan 1 2001 12:30 AM34 is represented by the number 36892.521. The integer part of the number stores the number of days since the epoch and the fractional part stores the percentage of the day. A date or time in Excel is just like any other number. To have the number display as a date you must apply an Excel number format to it. Here are some examples. Excel::Writer::XLSX doesn39t automatically convert input date strings into Excel39s formatted date numbers due to the large number of possible date formats and also due to the possibility of misinterpretation. For example, does 020304 mean March 2 2004, February 3 2004 or even March 4 2002. Therefore, in order to handle dates you will have to convert them to numbers and apply an Excel format. Some methods for converting dates are listed in the next section. The most direct way is to convert your dates to the ISO8601 yyyy-mm-ddThh:mm:ss. sss date format and use the writedatetime() worksheet method: See the writedatetime() section of the documentation for more details. A general methodology for handling date strings with writedatetime() is: Here is an example: For a slightly more advanced solution you can modify the write() method to handle date formats of your choice via the addwritehandler() method. See the addwritehandler() section of the docs and the writehandler3.pl and writehandler4.pl programs in the examples directory of the distro. The writedatetime() method above is just one way of handling dates and times. You can also use the convertdatetime() worksheet method to convert from an ISO8601 style date string to an Excel date and time number. The Excel::Writer::XLSX::Utility module which is included in the distro has datetime handling functions: Note: some of these functions require additional CPAN modules. Excel allows you to group rows or columns so that they can be hidden or displayed with a single mouse click. This feature is referred to as outlines. Outlines can reduce complex data down to a few salient sub-totals or summaries. This feature is best viewed in Excel but the following is an ASCII representation of what a worksheet with three outlines might look like. Rows 3-4 and rows 7-8 are grouped at level 2. Rows 2-9 are grouped at level 1. The lines at the left hand side are called outline level bars. Clicking the minus sign on each of the level 2 outlines will collapse and hide the data as shown in the next figure. The minus sign changes to a plus sign to indicate that the data in the outline is hidden. Clicking on the minus sign on the level 1 outline will collapse the remaining rows as follows: Grouping in Excel::Writer::XLSX is achieved by setting the outline level via the setrow() and setcolumn() worksheet methods: The following example sets an outline level of 1 for rows 1 and 2 (zero-indexed) and columns B to G. The parameters height and XF are assigned default values since they are undefined: Excel allows up to 7 outline levels. Therefore the level parameter should be in the range 0 60 level 60 7 . Rows and columns can be collapsed by setting the hidden flag for the hidden rowscolumns and setting the collapsed flag for the rowcolumn that has the collapsed symbol: Note: Setting the collapsed flag is particularly important for compatibility with OpenOffice. org and Gnumeric. For a more complete example see the outline. pl and outlinecollapsed. pl programs in the examples directory of the distro. Some additional outline properties can be set via the outlinesettings() worksheet method, see above. Data validation is a feature of Excel which allows you to restrict the data that a users enters in a cell and to display help and warning messages. It also allows you to restrict input to values in a drop down list. A typical use case might be to restrict data in a cell to integer values in a certain range, to provide a help message to indicate the required value and to issue a warning if the input data doesn39t meet the stated criteria. In Excel::Writer::XLSX we could do that as follows: For more information on data validation see the following Microsoft support article 34Description and examples of data validation in Excel34: support. microsoftkb211485 . The following sections describe how to use the datavalidation() method and its various options. datavalidation( row, col, ) The datavalidation() method is used to construct an Excel data validation. It can be applied to a single cell or a range of cells. You can pass 3 parameters such as (row, col, ) or 5 parameters such as (firstrow, firstcol, lastrow, lastcol, ). You can also use A1 style notation. For example: See also the note about 34Cell notation34 for more information. The last parameter in datavalidation() must be a hash ref containing the parameters that describe the type and style of the data validation. The allowable parameters are: These parameters are explained in the following sections. Most of the parameters are optional, however, you will generally require the three main options validate. criteria and value . The datavalidation method returns: This parameter is passed in a hash ref to datavalidation() . The validate parameter is used to set the type of data that you wish to validate. It is always required and it has no default value. Allowable values are: any is used to specify that the type of data is unrestricted. This is useful to display an input message without restricting the data that can be entered. integer restricts the cell to integer values. Excel refers to this as 39whole number39. decimal restricts the cell to decimal values. list restricts the cell to a set of user specified values. These can be passed in an array ref or as a cell range (named ranges aren39t currently supported): Excel requires that range references are only to cells on the same worksheet. date restricts the cell to date values. Dates in Excel are expressed as integer values but you can also pass an ISO8601 style string as used in writedatetime(). See also 34DATES AND TIME IN EXCEL34 for more information about working with Excel39s dates. time restricts the cell to time values. Times in Excel are expressed as decimal values but you can also pass an ISO8601 style string as used in writedatetime(). See also 34DATES AND TIME IN EXCEL34 for more information about working with Excel39s times. length restricts the cell data based on an integer string length. Excel refers to this as 39Text length39. custom restricts the cell based on an external Excel formula that returns a TRUEFALSE value. This parameter is passed in a hash ref to datavalidation() . The criteria parameter is used to set the criteria by which the data in the cell is validated. It is almost always required except for the list and custom validate options. It has no default value. Allowable values are: You can either use Excel39s textual description strings, in the first column above, or the more common symbolic alternatives. The following are equivalent: The list and custom validate options don39t require a criteria. If you specify one it will be ignored. This parameter is passed in a hash ref to datavalidation() . The value parameter is used to set the limiting value to which the criteria is applied. It is always required and it has no default value. You can also use the synonyms minimum or source to make the validation a little clearer and closer to Excel39s description of the parameter: This parameter is passed in a hash ref to datavalidation() . The maximum parameter is used to set the upper limiting value when the criteria is either 39between39 or 39not between39 : This parameter is passed in a hash ref to datavalidation() . The ignoreblank parameter is used to toggle on and off the 39Ignore blank39 option in the Excel data validation dialog. When the option is on the data validation is not applied to blank data in the cell. It is on by default. This parameter is passed in a hash ref to datavalidation() . The dropdown parameter is used to toggle on and off the 39In-cell dropdown39 option in the Excel data validation dialog. When the option is on a dropdown list will be shown for list validations. It is on by default. This parameter is passed in a hash ref to datavalidation() . The inputtitle parameter is used to set the title of the input message that is displayed when a cell is entered. It has no default value and is only displayed if the input message is displayed. See the inputmessage parameter below. The maximum title length is 32 characters. This parameter is passed in a hash ref to datavalidation() . The inputmessage parameter is used to set the input message that is displayed when a cell is entered. It has no default value. The message can be split over several lines using newlines, 34n34 in double quoted strings. The maximum message length is 255 characters. This parameter is passed in a hash ref to datavalidation() . The showinput parameter is used to toggle on and off the 39Show input message when cell is selected39 option in the Excel data validation dialog. When the option is off an input message is not displayed even if it has been set using inputmessage. It is on by default. This parameter is passed in a hash ref to datavalidation() . The errortitle parameter is used to set the title of the error message that is displayed when the data validation criteria is not met. The default error title is 39Microsoft Excel39. The maximum title length is 32 characters. This parameter is passed in a hash ref to datavalidation() . The errormessage parameter is used to set the error message that is displayed when a cell is entered. The default error message is 34The value you entered is not valid. nA user has restricted values that can be entered into the cell.34. The message can be split over several lines using newlines, 34n34 in double quoted strings. The maximum message length is 255 characters. This parameter is passed in a hash ref to datavalidation() . The errortype parameter is used to specify the type of error dialog that is displayed. There are 3 options: The default is 39stop39 . This parameter is passed in a hash ref to datavalidation() . The showerror parameter is used to toggle on and off the 39Show error alert after invalid data is entered39 option in the Excel data validation dialog. When the option is off an error message is not displayed even if it has been set using errormessage. It is on by default. Example 1. Limiting input to an integer greater than a fixed value. Example 2. Limiting input to an integer greater than a fixed value where the value is referenced from a cell. Example 3. Limiting input to a decimal in a fixed range. Example 4. Limiting input to a value in a dropdown list. Example 5. Limiting input to a value in a dropdown list where the list is specified as a cell range. Example 6. Limiting input to a date in a fixed range. Example 7. Displaying a message when the cell is selected. See also the datavalidate. pl program in the examples directory of the distro. Conditional formatting is a feature of Excel which allows you to apply a format to a cell or a range of cells based on a certain criteria. For example the following criteria is used to highlight cells 62 50 in red in the conditionalformat. pl example from the distro: conditionalformatting( row, col, ) The conditionalformatting() method is used to apply formatting based on user defined criteria to an Excel::Writer::XLSX file. It can be applied to a single cell or a range of cells. You can pass 3 parameters such as (row, col, ) or 5 parameters such as (firstrow, firstcol, lastrow, lastcol, ). You can also use A1 style notation. For example: See also the note about 34Cell notation34 for more information. Using A1 style notation is also possible to specify non-contiguous ranges, separated by a comma. For example: The last parameter in conditionalformatting() must be a hash ref containing the parameters that describe the type and style of the data validation. The main parameters are: Other, less commonly used parameters are: Additional parameters which are used for specific conditional format types are shown in the relevant sections below. This parameter is passed in a hash ref to conditionalformatting() . The type parameter is used to set the type of conditional formatting that you wish to apply. It is always required and it has no default value. Allowable type values and their associated parameters are: All conditional formatting types have a format parameter, see below. Other types and parameters such as icon sets will be added in time. This is the most common conditional formatting type. It is used when a format is applied to a cell based on a simple criterion. For example: Or, using the between criteria: The criteria parameter is used to set the criteria by which the cell data will be evaluated. It has no default value. The most common criteria as applied to are: You can either use Excel39s textual description strings, in the first column above, or the more common symbolic alternatives. Additional criteria which are specific to other conditional format types are shown in the relevant sections below. The value is generally used along with the criteria parameter to set the rule by which the cell data will be evaluated. The value property can also be an cell reference. The format parameter is used to specify the format that will be applied to the cell when the conditional formatting criterion is met. The format is created using the addformat() method in the same way as cell formats: The conditional format follows the same rules as in Excel: it is superimposed over the existing cell format and not all font and border properties can be modified. Font properties that can39t be modified are font name, font size, superscript and subscript. The border property that cannot be modified is diagonal borders. Excel specifies some default formats to be used with conditional formatting. You can replicate them using the following Excel::Writer::XLSX formats: The minimum parameter is used to set the lower limiting value when the criteria is either 39between39 or 39not between39 : The maximum parameter is used to set the upper limiting value when the criteria is either 39between39 or 39not between39. See the previous example. The date type is the same as the cell type and uses the same criteria and values. However it allows the value. minimum and maximum properties to be specified in the ISO8601 yyyy-mm-ddThh:mm:ss. sss date format which is detailed in the writedatetime() method. The timeperiod type is used to specify Excel39s 34Dates Occurring34 style conditional format. The period is set in the criteria and can have one of the following values: The text type is used to specify Excel39s 34Specific Text34 style conditional format. It is used to do simple string matching using the criteria and value parameters: The criteria can have one of the following values: The value parameter should be a string or single character. The average type is used to specify Excel39s 34Average34 style conditional format. The type of average for the conditional format range is specified by the criteria : The duplicate type is used to highlight duplicate cells in a range: The unique type is used to highlight unique cells in a range: The top type is used to specify the top n values by number or percentage in a range: The criteria can be used to indicate that a percentage condition is required: The bottom type is used to specify the bottom n values by number or percentage in a range. It takes the same parameters as top. see above. The blanks type is used to highlight blank cells in a range: The noblanks type is used to highlight non blank cells in a range: The errors type is used to highlight error cells in a range: The noerrors type is used to highlight non error cells in a range: The 2colorscale type is used to specify Excel39s 342 Color Scale34 style conditional format. This conditional type can be modified with mintype. maxtype. minvalue. maxvalue. mincolor and maxcolor. see below. The 3colorscale type is used to specify Excel39s 343 Color Scale34 style conditional format. This conditional type can be modified with mintype. midtype. maxtype. minvalue. midvalue. maxvalue. mincolor. midcolor and maxcolor. see below. The databar type is used to specify Excel39s 34Data Bar34 style conditional format. This conditional type can be modified with mintype. maxtype. minvalue. maxvalue and barcolor. see below. The formula type is used to specify a conditional format based on a user defined formula: The formula is specified in the criteria . The mintype and maxtype properties are available when the conditional formatting type is 2colorscale. 3colorscale or databar. The midtype is available for 3colorscale. The properties are used as follows: The available minmidmax types are: The minvalue and maxvalue properties are available when the conditional formatting type is 2colorscale. 3colorscale or databar. The midvalue is available for 3colorscale. The properties are used as follows: The mincolor and maxcolor properties are available when the conditional formatting type is 2colorscale. 3colorscale or databar. The midcolor is available for 3colorscale. The properties are used as follows: The color can be specifies as an Excel::Writer::XLSX color index or, more usefully, as a HTML style RGB hex number, as shown above. The stopiftrue parameter, if set to a true value, will enable the 34stop if true34 feature on the conditional formatting rule, so that subsequent rules are not examined for any cell on which the conditions for this rule are met. Example 1. Highlight cells greater than an integer value. Example 2. Highlight cells greater than a value in a reference cell. Example 3. Highlight cells greater than a certain date: Example 4. Highlight cells with a date in the last seven days: Example 5. Highlight cells with strings starting with the letter b : Example 6. Highlight cells that are 1 std deviation above the average for the range: Example 7. Highlight duplicate cells in a range: Example 8. Highlight unique cells in a range. Example 9. Highlight the top 10 cells. Example 10. Highlight blank cells. See also the conditionalformat. pl example program in EXAMPLES . Sparklines are a feature of Excel 2010 which allows you to add small charts to worksheet cells. These are useful for showing visual trends in data in a compact format. In Excel::Writer::XLSX Sparklines can be added to cells using the addsparkline() worksheet method: Note: Sparklines are a feature of Excel 2010 only. You can write them to an XLSX file that can be read by Excel 2007 but they won39t be displayed. addsparkline( ) The addsparkline() worksheet method is used to add sparklines to a cell or a range of cells. The parameters to addsparkline() must be passed in a hash ref. The main sparkline parameters are: Other, less commonly used parameters are: These parameters are explained in the sections below: This is the cell where the sparkline will be displayed: The location should be a single cell. (For multiple cells see 34Grouped Sparklines34 below). To specify the location in row-column notation use the xlrowcoltocell() function from the Excel::Writer::XLSX::Utility module. This specifies the cell data range that the sparkline will plot: The range should be a 2D array. (For 3D arrays of cells see 34Grouped Sparklines34 below). If range is not on the same worksheet you can specify its location using the usual Excel notation: If the worksheet contains spaces or special characters you should quote the worksheet name in the same way that Excel does: To specify the location in row-column notation use the xlrange() or xlrangeformula() functions from the Excel::Writer::XLSX::Utility module. Specifies the type of sparkline. There are 3 available sparkline types: Excel provides 36 built-in Sparkline styles in 6 groups of 6. The style parameter can be used to replicate these and should be a corresponding number from 1. 36. The style number starts in the top left of the style grid and runs left to right. The default style is 1. It is possible to override colour elements of the sparklines using the color parameters below. Turn on the markers for line style sparklines. Markers aren39t shown in Excel for column and winloss sparklines. Highlight negative values in a sparkline range. This is usually required with winloss sparklines. Display a horizontal axis in the sparkline: Plot the data from right-to-left instead of the default left-to-right: Adjust the default line weight (thickness) for line style sparklines. The weight value should be one of the following values allowed by Excel: Highlight points in a sparkline range. Specify the maximum and minimum vertical axis values: As a special case you can set the maximum and minimum to be for a group of sparklines rather than one: Define how empty cells are handled in a sparkline. The available options are: Plot data in hidden rows and columns: Note, this option is off by default. Specify an alternative date axis for the sparkline. This is useful if the data being plotted isn39t at fixed width intervals: The number of cells in the date range should correspond to the number of cells in the data range. It is possible to override the colour of a sparkline style using the following parameters: The color should be specified as a HTML style rrggbb hex value: The addsparkline() worksheet method can be used multiple times to write as many sparklines as are required in a worksheet. However, it is sometimes necessary to group contiguous sparklines so that changes that are applied to one are applied to all. In Excel this is achieved by selecting a 3D range of cells for the data range and a 2D range of cells for the location . In Excel::Writer::XLSX, you can simulate this by passing an array refs of values to location and range : See the sparklines1.pl and sparklines2.pl example programs in the examples directory of the distro. Tables in Excel are a way of grouping a range of cells into a single entity that has common formatting or that can be referenced from formulas. Tables can have column headers, autofilters, total rows, column formulas and default formatting. Note, tables don39t work in Excel::Writer::XLSX when setoptimization() mode in on. addtable( row1, col1, row2, col2, ) Tables are added to a worksheet using the addtable() method: The data range can be specified in 39A139 or 39rowcol39 notation (see also the note about 34Cell notation34 for more information): The last parameter in addtable() should be a hash ref containing the parameters that describe the table options and data. The available parameters are: The table parameters are detailed below. There are no required parameters and the hash ref isn39t required if no options are specified. The data parameter can be used to specify the data in the cells of the table. Table data can also be written separately, as an array or individual cells. Writing the cell data separately is occasionally required when you need to control the write() method used to populate the cells or if you wish to tweak the cell formatting. The data structure should be an array ref of array refs holding row data as shown above. The headerrow parameter can be used to turn on or off the header row in the table. It is on by default. The header row will contain default captions such as Column 1. Column 2. etc. These captions can be overridden using the columns parameter below. The autofilter parameter can be used to turn on or off the autofilter in the header row. It is on by default. The autofilter is only shown if the headerrow is on. Filters within the table are not supported. The bandedrows parameter can be used to used to create rows of alternating colour in the table. It is on by default. The bandedcolumns parameter can be used to used to create columns of alternating colour in the table. It is off by default. The firstcolumn parameter can be used to highlight the first column of the table. The type of highlighting will depend on the style of the table. It may be bold text or a different colour. It is off by default. The lastcolumn parameter can be used to highlight the last column of the table. The type of highlighting will depend on the style of the table. It may be bold text or a different colour. It is off by default. The style parameter can be used to set the style of the table. Standard Excel table format names should be used (with matching capitalisation): The default table style is 39Table Style Medium 939. By default tables are named Table1. Table2. etc. The name parameter can be used to set the name of the table: If you override the table name you must ensure that it doesn39t clash with an existing table name and that it follows Excel39s requirements for table names office. microsoften-001excel-helpdefine-and-use-names-in-formulas-HA010147120.aspxBMsyntaxrulesfornames . If you need to know the name of the table, for example to use it in a formula, you can get it as follows: The totalrow parameter can be used to turn on the total row in the last row of a table. It is distinguished from the other rows by a different formatting and also with dropdown SUBTOTAL functions. The default total row doesn39t have any captions or functions. These must by specified via the columns parameter below. The columns parameter can be used to set properties for columns within the table. The sub-properties that can be set are: The column data must be specified as an array ref of hash refs. For example to override the default 39Column n39 style table headers: If you don39t wish to specify properties for a specific column you pass an empty hash ref and the defaults will be applied: Column formulas can by applied using the formula column property: The Excel 2007 This Row and Excel 2010 structural references are supported within the formula. As stated above the totalrow table parameter turns on the 34Total34 row in the table but it doesn39t populate it with any defaults. Total captions and functions must be specified via the columns property and the totalstring. totalfunction and totalvalue sub properties: The supported totals row SUBTOTAL functions are: User defined functions or formulas aren39t supported. It is also possible to set a calculated value for the totalfunction using the totalvalue sub property. This is only necessary when creating workbooks for applications that cannot calculate the value of formulas automatically. This is similar to setting the value optional property in writeformula() : Formatting can also be applied to columns, to the column data using format and to the header using headerformat : Standard Excel::Writer::XLSX format objects can be used. However, they should be limited to numerical formats for the columns and simple formatting like text wrap for the headers. Overriding other table formatting may produce inconsistent results. The following is a brief introduction to formulas and functions in Excel and Excel::Writer::XLSX. A formula is a string that begins with an equals sign: The formula can contain numbers, strings, boolean values, cell references, cell ranges and functions. Named ranges are not supported. Formulas should be written as they appear in Excel, that is cells and functions must be in uppercase. Cells in Excel are referenced using the A1 notation system where the column is designated by a letter and the row by a number. Columns range from A to XFD i. e. 0 to 16384, rows range from 1 to 1048576. The Excel::Writer::XLSX::Utility module that is included in the distro contains helper functions for dealing with A1 notation, for example: The Excel notation in cell references is also supported. This allows you to specify whether a row or column is relative or absolute. This only has an effect if the cell is copied. The following examples show relative and absolute values. Formulas can also refer to cells in other worksheets of the current workbook. For example: The sheet reference and the cell reference are separated by. the exclamation mark symbol. If worksheet names contain spaces, commas or parentheses then Excel requires that the name is enclosed in single quotes as shown in the last two examples above. In order to avoid using a lot of escape characters you can use the quote operator q to protect the quotes. See perlop in the main Perl documentation. Only valid sheet names that have been added using the addworksheet() method can be used in formulas. You cannot reference external workbooks. The following table lists the operators that are available in Excel39s formulas. The majority of the operators are the same as Perl39s, differences are indicated: The range and comma operators can have different symbols in non-English versions of Excel, see below. For a general introduction to Excel39s formulas and an explanation of the syntax of the function refer to the Excel help files or the following: office. microsoften-usassistanceCH062528031033.aspx . In most cases a formula in Excel can be used directly in the writeformula method. However, there are a few potential issues and differences that the user should be aware of. These are explained in the following sections. Excel stores formulas in the format of the US English version, regardless of the language or locale of the end-user39s version of Excel. Therefore all formula function names written using Excel::Writer::XLSX must be in English: Also, formulas must be written with the US style separatorrange operator which is a comma (not semi-colon). Therefore a formula with multiple values should be written as follows: If you have a non-English version of Excel you can use the following multi-lingual Formula Translator (en. excel-translator. delanguage ) to help you convert the formula. It can also replace semi-colons with commas. Excel 2010 and later added functions which weren39t defined in the original file specification. These functions are referred to by Microsoft as future functions. Examples of these functions are ACOT. CHISQ. DIST. RT. CONFIDENCE. NORM. STDEV. P. STDEV. S and WORKDAY. INTL . When written using writeformula() these functions need to be fully qualified with a xlfn. (or other) prefix as they are shown the list below. For example: They will appear without the prefix in Excel. The following list is taken from the MS XLSX extensions documentation on future functions: msdn. microsoften-uslibrarydd90748028voffice.1229.aspx : Worksheet tables can be added with Excel::Writer::XLSX using the addtable() method: By default tables are named Table1. Table2. etc. in the order that they are added. However it can also be set by the user using the name parameter: If you need to know the name of the table, for example to use it in a formula, you can get it as follows: When used in a formula a table name such as TableX should be referred to as TableX (like a Perl array): If there is an error in the syntax of a formula it is usually displayed in Excel as NAME. If you encounter an error like this you can debug it as follows: Finally if you have completed all the previous steps and still get a NAME error you can examine a valid Excel file to see what the correct syntax should be. To do this you should create a valid formula in Excel and save the file. You can then examine the XML in the unzipped file. The following shows how to do that using Linux unzip and libxml39s xmllint xmlsoft. orgxmllint. html to format the XML for clarity: Excel::Writer::XLSX doesn39t calculate the result of a formula and instead stores the value 0 as the formula result. It then sets a global flag in the XLSX file to say that all formulas and functions should be recalculated when the file is opened. This is the method recommended in the Excel documentation and in general it works fine with spreadsheet applications. However, applications that don39t have a facility to calculate formulas will only display the 0 results. Examples of such applications are Excel Viewer, PDF Converters, and some mobile device applications. If required, it is also possible to specify the calculated result of the formula using the optional last value parameter in writeformula : The value parameter can be a number, a string, a boolean sting ( 39TRUE39 or 39FALSE39 ) or one of the following Excel error codes: It is also possible to specify the calculated result of an array formula created with writearrayformula : However, using this parameter only writes a single value to the upper left cell in the result array. For a multi-cell array formula where the results are required, the other result values can be specified by using writenumber() to write to the appropriate cell: An Excel xlsm file is exactly the same as a xlsx file except that is includes an additional vbaProject. bin file which contains functions andor macros. Excel uses a different extension to differentiate between the two file formats since files containing macros are usually subject to additional security checks. The vbaProject. bin file is a binary OLE COM container. This was the format used in older xls versions of Excel prior to Excel 2007. Unlike all of the other components of an xlsxxlsm file the data isn39t stored in XML format. Instead the functions and macros as stored as pre-parsed binary format. As such it wouldn39t be feasible to define macros and create a vbaProject. bin file from scratch (at least not in the remaining lifespan and interest levels of the author). Instead a workaround is used to extract vbaProject. bin files from existing xlsm files and then add these to Excel::Writer::XLSX files. The extractvba utility is used to extract the vbaProject. bin binary from an Excel 2007 xlsm file. The utility is included in the Excel::Writer::XLSX bin directory and is also installed as a standalone executable file: Once the vbaProject. bin file has been extracted it can be added to the Excel::Writer::XLSX workbook using the addvbaproject() method: If the VBA file contains functions you can then refer to them in calculations using writeformula : Excel files that contain functions and macros should use an xlsm extension or else Excel will complain and possibly not open the file: It is also possible to assign a macro to a button that is inserted into a worksheet using the insertbutton() method: It may be necessary to specify a more explicit macro name prefixed by the workbook VBA name as follows: See the macros. pl from the examples directory for a working example. Note: Button is the only VBA Control supported by Excel::Writer::XLSX. Due to the large effort in implementation (1 man months) it is unlikely that any other form elements will be added in the future. VBA macros generally refer to workbook and worksheet objects. If the VBA codenames aren39t specified then Excel::Writer::XLSX will use the Excel defaults of ThisWorkbook and Sheet1. Sheet2 etc. If the macro uses other codenames you can set them using the workbook and worksheet setvbaname() methods as follows: You can find the names that are used in the VBA editor or by unzipping the xlsm file and grepping the files. The following shows how to do that using libxml39s xmllint xmlsoft. orgxmllint. html to format the XML for clarity: Note: This step is particularly important for macros created with non-English versions of Excel. This feature should be considered experimental and there is no guarantee that it will work in all cases. Some effort may be required and some knowledge of VBA will certainly help. If things don39t work out here are some things to try: Start with a simple macro file, ensure that it works and then add complexity. Try to extract the macros from an Excel 2007 file. The method should work with macros from later versions (it was also tested with Excel 2010 macros). However there may be features in the macro files of more recent version of Excel that aren39t backward compatible. Check the code names that macros use to refer to the workbook and worksheets (see the previous section above). In general VBA uses a code name of ThisWorkbook to refer to the current workbook and the sheet name (such as Sheet1 ) to refer to the worksheets. These are the defaults used by Excel::Writer::XLSX. If the macro uses other names then you can specify these using the workbook and worksheet setvbaname() methods: The following example shows some of the basic features of Excel::Writer::XLSX. The following is a general example which demonstrates some features of working with multiple worksheets. Example of how to add conditional formatting to an Excel::Writer::XLSX file. The example below highlights cells that have a value greater than or equal to 50 in red and cells below that value in green. The following is a simple example of using functions. The following example converts a tab separated file called tab. txt into an Excel file called tab. xlsx . NOTE: This is a simple conversion program for illustrative purposes only. For converting a CSV or Tab separated or any other type of delimited text file to Excel I recommend the more rigorous csv2xls program that is part of H. Merijn Brand39s Text::CSVXS module distro. See the examplescsv2xls link here: search. cpan. org The following is a description of the example files that are provided in the standard Excel::Writer::XLSX distribution. They demonstrate the different features and options of the module. See Excel::Writer::XLSX::Examples for more details. The following limits are imposed by Excel 2007: Per worksheet. Excel allows a greater number of non-unique hyperlinks if they are contiguous and can be grouped into a single range. This will be supported in a later version of Excel::Writer::XLSX if possible. The Excel::Writer::XLSX module is a drop-in replacement for Spreadsheet::WriteExcel . It supports all of the features of Spreadsheet::WriteExcel with some minor differences noted below. Spreadsheet::WriteExcel was written to optimise speed and reduce memory usage. However, these design goals meant that it wasn39t easy to implement features that many users requested such as writing formatting and data separately. As a result Excel::Writer::XLSX takes a different design approach and holds a lot more data in memory so that it is functionally more flexible. The effect of this is that Excel::Writer::XLSX is about 30 slower than Spreadsheet::WriteExcel and uses 5 times more memory. In addition the extended row and column ranges in Excel 2007 mean that it is possible to run out of memory creating large files. This was almost never an issue with Spreadsheet::WriteExcel. This memory usage can be reduced almost completely by using the Workbook setoptimization() method: This also gives an increase in performance to within 1-10 of Spreadsheet::WriteExcel, see below. The trade-off is that you won39t be able to take advantage of any new features that manipulate cell data after it is written. One such feature is Tables. The performance figures below show execution speed and memory usage for 60 columns x N rows for a 5050 mixture of strings and numbers. Percentage speeds are relative to Spreadsheet::WriteExcel. The module can be installed using the standard Perl procedure: A filename must be given in the constructor. The file cannot be opened for writing. The directory that you are writing to may be protected or the file may be in use by another program. On Windows this is usually caused by the file that you are trying to create clashing with a version that is already open and locked by Excel. This warning occurs when you create an XLSX file but give it an xls extension. Depending on your requirements, background and general sensibilities you may prefer one of the following methods of getting data into Excel: This module is the precursor to Excel::Writer::XLSX and uses the same interface. It produces files in the Excel Biff xls format that was used in Excel versions 97-2003. These files can still be read by Excel 2007 but have some limitations in relation to the number of rows and columns that the format supports. Win32::OLE module and office automationThis requires a Windows platform and an installed copy of Excel. This is the most powerful and complete method for interfacing with Excel. CSV, comma separated variables or textExcel will open and automatically convert files with a csv extension. To create CSV files refer to the Text::CSVXS module. DBI with DBD::ADO or DBD::ODBCExcel files contain an internal index table that allows them to act like a database file. Using one of the standard Perl database modules you can connect to an Excel file as a database. To read data from Excel files try: A module for reading formatted or unformatted data form XLSX files. A lightweight module for reading data from XLSX files. This module can read data from an Excel XLS file but it doesn39t support the XLSX format. Win32::OLE module and office automation (reading)DBI with DBD::ADO or DBD::ODBC. Memory usage is very high for large worksheets. If you run out of memory creating large worksheets use the setoptimization() method. See 34SPEED AND MEMORY USAGE34 for more information. Perl packaging programs can39t find chart modules. When using Excel::Writer::XLSX charts with Perl packagers such as PAR or Cava you should explicitly include the chart that you are trying to create in your use statements. This isn39t a bug as such but it might help someone from banging their head off a wall: If you wish to submit a bug report run the bugreport. pl program in the examples directory of the distro. The roadmap is as follows: New separated dataformatting API to allow cells to be formatted after data is added. More charting features. There is a Google group for discussing and asking questions about Excel::Writer::XLSX. This is a good place to search to see if your question has been asked before: groups. googlegroupspreadsheet-writeexcel . If you39d care to donate to the Excel::Writer::XLSX project or sponsor a new feature, you can do so via PayPal: tinyurl7ayes . The following people contributed to the debugging, testing or enhancement of Excel::Writer::XLSX: Rob Messer of IntelliSurvey gave me the initial prompt to port Spreadsheet::WriteExcel to the XLSX format. IntelliSurvey (intellisurvey ) also sponsored large files optimisations and the charting feature. Bariatric Advantage (bariatricadvantage ) sponsored work on chart formatting. Eric Johnson provided the ability to use secondary axes with charts. Thanks to Foxtons (foxtons. co. uk ) for sponsoring this work. BuildFax (buildfax ) sponsored the Tables feature and the Chart point formatting feature. Because this software is licensed free of charge, there is no warranty for the software, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders andor other parties provide the software 34as is34 without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair, or correction. In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify andor redistribute the software as permitted by the above licence, be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software), even if such holder or other party has been advised of the possibility of such damages. John McNamara jmcnamaracpan. org

No comments:

Post a Comment