View Single Post
01/11/17, 04:25 PM   #4
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
You could create a slash command in your addon like this for example:

Lua Code:
  1. SLASH_COMMANDS["/exportcsf"]=function()
  2.     MyAddonsSaveData = {}
  3.     SHARED_FURNITURE:GetMarketProductCategoryTreeData():GetNumEntriesRecursive(function(entry)
  4.         local line = {}
  5.         line[#line + 1] = tostring(entry.marketProductId)
  6.         line[#line + 1] = entry.formattedName
  7.         line[#line + 1] = entry.icon
  8.         line[#line + 1] = tostring(entry.quality)
  9.         line[#line + 1] = tostring(entry.cost)
  10.         line[#line + 1] = tostring(entry.costAfterDiscount)
  11.         line[#line + 1] = tostring(entry.discountPercent)
  12.         line[#line + 1] = tostring(entry.categoryId)
  13.         line[#line + 1] = tostring(entry.subcategoryId)
  14.         line[#line + 1] = tostring(entry.isFree)
  15.         line[#line + 1] = tostring(entry.isNew)
  16.         line[#line + 1] = tostring(entry.onSale)
  17.         MyAddonsSaveData[#MyAddonsSaveData + 1] = table.concat(line, ";")
  18.     end)
  19. end

It will save each entry in a new line in your saved variables file and you can then just use notepad++ to clean it up and save it as a csv.
You need to open the market tab in the housing editor once before it will produce any data.
  Reply With Quote