您可以帮助我调整此VBA Excel模块功能吗?
package com.exxonmobil.asr.backoffice.configuration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.AuthenticationEntryPoint;
@Configuration
@EnableWebSecurity
public class SpringSecurityConfiguration extends WebSecurityConfigurerAdapter {
private static final String SPRING_SECURITY_PASSWORD = "spring.security.password";
private static final String SPRING_SECURITY_USERNAME = "spring.security.username";
@Autowired
private AuthenticationEntryPoint authEntryPoint;
@Autowired
private Environment env;
@Bean
public PasswordEncoder bcryptPasswordEncoder(){
return new BCryptPasswordEncoder();
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().withUser(env.getProperty(SPRING_SECURITY_USERNAME))
.password(bcryptPasswordEncoder().encode(env.getProperty(SPRING_SECURITY_PASSWORD))).roles("USER");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable().authorizeRequests().antMatchers("/**").hasAnyRole("USER").anyRequest().authenticated().and().httpBasic()
.authenticationEntryPoint(authEntryPoint);
}
}
我尝试根据A列上的值从C列中选择值。我要匹配的值是“ TRUE”,因此应该对A列中所有具有“ TRUE”的行进行求和并由函数返回。
VBA调试器没有给出任何错误,但是在工作表中使用函数时,它显示#value!。