save

Save as different file type

核能气质少年 提交于 2021-02-08 07:14:10
问题 I would like to make my macro able to save a xlsx file as csv exactly with the same name when running it. This is what I tried: ActiveWorkbook.saveas Filename:=ActiveWorkbook.Path & "\" & _ ActiveWorkbook.Name & ".csv", FileFormat:=xlCSV, CreateBackup:=False However, it saves the file as .xlsx.csv (i.e, a file called prices.xlsx is saves as prices.xlsx.csv) How could I save the file with a different file extension, without the .xlsx? 回答1: If you want to make it more failsafe, in case your

Creating a new folder in Sharepoint using VBA

泪湿孤枕 提交于 2021-02-07 18:26:46
问题 I'm trying to automatically save workbooks using VBA to a Sharepoint folder- which needs to be created first. Code I have below works ONLY for saving the file. The MkDir function returns a Run-time error 76: Path not found. I'm at a loss what causes this error, because the path before /txt DOES exist and I do have the right permissions to add new folders by hand. I have also tried replacing the current path with \ instead of /, but other than making the code significantly slower this has no

Saving parameters with dat.gui seems broken?

此生再无相见时 提交于 2021-02-07 13:18:49
问题 There seems to be a problem with saving parameters in dat.gui, or I'm missing something really obvious.. The problem shows when clicking the gear icon which should open a popup with the JSON to be saved. Also saving to local storage does not work for me. Here are two JSFiddles: http://jsfiddle.net/navFooh/XZcde/ with dat.gui.min.js, clicking the gear throws an error in the console: Uncaught TypeError: Cannot read property 'forEach' of undefined dat.gui.min.js:3 http://jsfiddle.net/navFooh

Plotly: How to save plotly express plot into a html or static image file?

£可爱£侵袭症+ 提交于 2021-02-07 09:02:33
问题 I love plotly and recently plotly.express. However, I feel saving the figure is pretty tricky. How to save plotly.express or plotly plot into a individual html or static image file? Anyone can help? Thanks 回答1: Updated answer: With newer versions of plotly, static Image pxport in Python is a breeze. Just make sure to install kaleido using: pip install -U kaleido or, for Anaconda: conda install -c conda-forge python-kaleido And then run fig.write_image("<filename>") and `.pdf` are all

R: Save all data.frames in workspace to separate .RData files

﹥>﹥吖頭↗ 提交于 2021-02-04 16:11:05
问题 I have several data.frames in an environment which I would like to save into separate .RData files. Is there a function which is able to save to whole workspace? I usually just do this with the following function: save(x, file = "xy.RData") but is there a way I could save all the data.frames separately at once? 回答1: Creating a bunch of different files isn't how save() is vectorized. Probably better to use a loop here. First, get a vector of all of your data.frame names. dfs<-Filter(function(x

R: save figures in the zoomed window with command?

吃可爱长大的小学妹 提交于 2021-01-29 18:52:53
问题 I have several plots to draw and save. I want to save the graph popped up in the zoomed window. What I did is as follows (which is normal save): SaveName <- c("A.pdf", "B.pdf") Path <- "~" GroupName <- c("A", "B") for (i in seq_along(Group)) { pdf(file = paste(Path, SaveName[i], sep = ""), width = 8, height = 6) plotA <- ggplot(df %>% filter(Group == GroupName[i]), aes(x, y)) + geom_point() + print(plotA) dev.off() } In this way, the files saved are the same as that by clicking "Export" ->

Indicating format of multiple numbers in numpy.savetxt

被刻印的时光 ゝ 提交于 2021-01-29 18:03:01
问题 I want to save an array using numpy.savetxt . The array contains eight numbers. Only the format of the first number is different with respect to the latter seven. I know I can set the format of numbers as follows: numpy.savetxt(filename, array, fmt = "%03d" "%.10f" "%.10f" "%.10f" "%.10f" "%.10f" "%.10f" "%.10f") Here filename is just the name of my file e.g. numbers.dat and array is a 1D numpy array containing my eight numbers. The above line of code works but looks ridiculous because I'm

How to save R data object that has been created using assign()?

这一生的挚爱 提交于 2021-01-29 08:45:57
问题 I'm creating variables based on certain string combinations. Each variable would store some values. In this example, to make it simple, they store a numerical value. However, in actual problem, each would store a tibble . I need to store each tibble as RData and they have to be created using unique combinations of the string. The problem is when I use save() on this variable, it couldn't find it so the save would fail. res <- 12345 sku = 'sku_a' index = '1' # create variable based on string

error saving: Error in gzfile(file, “wb”) : cannot open the connection

扶醉桌前 提交于 2021-01-29 04:33:45
问题 I am trying to run a LDA topic analysis on Rstudio 3.3.0. I am at the following step but keep getting the error: Error in gzfile(file, "wb") : cannot open the connection In addition: Warning message: In gzfile(file, "wb") : cannot open compressed file 'results/Gibbs_5_1.rda', probable reason 'No such file or directory' There is a problem while saving. D <- nrow(data) folding <- sample(rep(seq_len(10), ceiling (D))[seq_len(D)]) for (k in topics) { for (chain in seq_len(10)) { FILE <- paste(

Android Picasso - Save image locally before viewing it in ImageView

大城市里の小女人 提交于 2021-01-28 18:18:38
问题 I have made an app which shows a list of image. But before, I downloaded all the images to the sdcard, and I show a progress dialog with the number of downloaded files. I'm thinking to optimise the process using Picasso because of many images to download. So no progress dialog. With Picasso, I would like to save the image in my app directory (as a normal downloaded file) before it is shown in the ImageView. I thought to use this code : Picasso picassoInstance = new Picasso.Builder(context)