Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Lightweight Spreadsheets for Laravel

    Lightweight Spreadsheets for Laravel

    August 29, 2024

    If you’re looking for a lightweight package that can read and write spreadsheets, Chris Morrell‘s Linen package is a lightweight spreadsheet package for Laravel. This package is a wrapper for the openspout/openspout package which lets you read and write spreadsheets in a fast and scalable way.

    Here are a few examples of how you can use the Linen package to read and write spreadsheets:

    use GlhdLinenCsvReader;
    use GlhdLinenExcelReader;

    $data = [
    [‘user_id’ => 1, ‘name’ => ‘Chris’, ‘nullable’ => null, ‘number’ => 40.2],
    [‘user_id’ => 10, ‘name’ => ‘Bogdan’, ‘nullable’ => ‘not null’, ‘number’ => -37],
    ];

    // CSV
    $collection = CsvReader::from(‘basic.csv’)->collect();
    $tempfile = CsvWriter::for($data)->writeToTemporaryFile();

    // Excel
    $collection = ExcelReader::from(‘basic.xlsx’)->collect();
    $tempfile = ExcelWriter::for($data)->writeToTemporaryFile();

    Linen provides some conveniences on top of the Openspout package, such as using Laravel’s LazyCollection class when reading spreadsheets. You can get started with this package by installing it via composer:

    composer require glhd/linen

    The readme and source code is available on GitHub at glhd/linen.

    The post Lightweight Spreadsheets for Laravel appeared first on Laravel News.

    Join the Laravel Newsletter to get all the latest
    Laravel articles like this directly in your inbox.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous Articlespatie/laravel-error-share
    Next Article How to Build Your First PHP Package

    Related Posts

    Machine Learning

    Salesforce AI Releases BLIP3-o: A Fully Open-Source Unified Multimodal Model Built with CLIP Embeddings and Flow Matching for Image Understanding and Generation

    May 16, 2025
    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 16, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    CVE-2024-52887 – Shrew Soft VPN Bookmark Script Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Google Pixel 9a vs. iPhone 16e: My camera comparison has a clear winner

    News & Updates

    The Dawn of Efficient AI: Zephyr 141B-A35B’s Innovative Leap

    Development

    Central Bank Argentina Data Breach: Hackers Allegedly Offer Customer Info for Sale

    Development

    Highlights

    Lsapi.dll: What Is It & How to Fix “Not Found” Errors

    January 30, 2025

    Lsapi.DLL is essential for the operation of certain apps and processes that handle network management.…

    This $28 ‘magic arm’ makes taking pictures so much easier (and it’s only $20 for Black Friday)

    November 22, 2024
    Microsoft may cut more jobs, and middle managers are in the crosshairs

    Microsoft may cut more jobs, and middle managers are in the crosshairs

    April 10, 2025

    Unleashing CI/CD Magic in Boomi’s Integration

    June 12, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.