'Using R to find "Percent of Sales" per SKU for forecasting

I am fairly new to R and would like to see if it is possible to make more efficient my forecasting methodology. I attempted to use R time series analysis for forecasting but my data set is relatively small in size and contains a lot of 0's/NA's. The methodology for forecasting I would like to use is Percent of Total Sales per Product (SKU from here on). So if I sold $10,000 in January 2022, and 40 units of SKU X at $10 per unit, SKU X would make up 4% of sales, then I could use that 4% of sales and apply it to a future sales dollars forecast. So if my Sales dollars forecast is $20,000 for February 2022 I would forecast 80 Units of this SKU. Any idea how to get started on this? From formatting and reading in data (data is currently in .xlsx format with headers) to packages or functions to use? Trying to output to an excel file .xlsx or .csv

PS I am currently doing this in excel with links to multiple workbooks but prefer not to use excel



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source